# HG changeset patch
# User Andrey Skvortsov <andrej.skvortzov@gmail.com>
# Date 1507036120 -10800
# Node ID b126c2f61bb65305d578a66f5b96cc638758dffd
# Parent  4bec5768afbb8c3ac599ff505274710fcf629a2c
make mki18n return 0 on success

diff -r 4bec5768afbb -r b126c2f61bb6 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)
+
+
+# -----------------------------------------------------------------------------