[gimp-help/wip/wormnest/python3-migration: 12/14] tools: Show error when no input XML file is specified for xml2po.




commit b6589cbe809625bd6f5696e10862b0e892f2243e
Author: Jacob Boerema <jgboerema gmail com>
Date:   Fri May 28 17:35:17 2021 -0400

    tools: Show error when no input XML file is specified for xml2po.

 tools/xml2po.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/tools/xml2po.py b/tools/xml2po.py
index ef8d725da..970713f1b 100755
--- a/tools/xml2po.py
+++ b/tools/xml2po.py
@@ -174,6 +174,9 @@ def main(argv):
         if len(filenames) > 1:
             print("Error: You can merge translations with only one XML file at a time.", file=sys.stderr)
             sys.exit(2)
+        elif len(filenames) == 0:
+            print("Error: You need to specify the XML input file.")
+            sys.exit(4)
 
         if not mofile:
             print("Error: You must specify MO file when merging translations.", file=sys.stderr)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]