make mki18n return 0 on success
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 03 Oct 2017 16:08:40 +0300
changeset 1844 b126c2f61bb6
parent 1843 4bec5768afbb
child 1845 3abde7651c38
make mki18n return 0 on success
i18n/mki18n.py
--- 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)
+
+
+# -----------------------------------------------------------------------------