cwctl.py
changeset 5121 a63d7886fcf5
parent 5048 bf8a53a11b6d
parent 5092 e126becc1263
child 5302 dfd147de06b2
--- a/cwctl.py	Tue Mar 30 14:32:03 2010 +0200
+++ b/cwctl.py	Wed Mar 31 15:39:09 2010 +0200
@@ -725,7 +725,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'))]
@@ -740,7 +740,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