cwctl.py
branchstable
changeset 5092 e126becc1263
parent 5043 fe52dd3936cf
child 5121 a63d7886fcf5
child 5288 92e9efc8cad5
--- a/cwctl.py	Tue Mar 30 19:59:56 2010 +0200
+++ b/cwctl.py	Wed Mar 31 09:45:14 2010 +0200
@@ -796,7 +796,7 @@
         # handle i18n upgrade:
         # * install new languages
         # * recompile catalogs
-        # in the first componant given
+        # XXX search available language in the first cube given
         from cubicweb import i18n
         templdir = cwcfg.cube_dir(config.cubes()[0])
         langs = [lang for lang, _ in i18n.available_catalogs(join(templdir, 'i18n'))]
@@ -811,7 +811,12 @@
         print
         print '-> instance migrated.'
         if not (CWDEV or self.config.nostartstop):
-            StartInstanceCommand().start_instance(appid)
+            # restart instance through fork to get a proper environment, avoid
+            # uicfg pb (and probably gettext catalogs, to check...)
+            forkcmd = '%s start %s' % (sys.argv[0], appid)
+            status = system(forkcmd)
+            if status:
+                print '%s exited with status %s' % (forkcmd, status)
         print