i18n/mki18n.py
changeset 1844 b126c2f61bb6
parent 1832 0f1081928d65
child 1847 6198190bc121
--- a/i18n/mki18n.py	Tue Oct 03 16:08:00 2017 +0300
+++ b/i18n/mki18n.py	Tue Oct 03 16:08:40 2017 +0300
@@ -460,7 +460,7 @@
         '--domain':   'domain',
         '--moTarget': 'moTarget',
     }
-
+    exit_code = 1
     try:
         optionList, pargs = getopt.getopt(sys.argv[1:], validOptions, validLongOptions)
     except getopt.GetoptError, e:
@@ -488,11 +488,13 @@
     if option['po']:
         try:
             makePO(appDirPath, option['domain'], option['verbose'])
+            exit_code = 0
         except IOError, e:
             printUsage(e[1] + '\n   You must write a file app.fil that contains the list of all files to parse.')
     if option['mo']:
         makeMO(appDirPath, option['moTarget'], option['domain'], option['verbose'], option['forceEnglish'])
-    sys.exit(1)
-
-
-# -----------------------------------------------------------------------------
+        exit_code = 0
+    sys.exit(exit_code)
+
+
+# -----------------------------------------------------------------------------