Index: tools/print_version.py |
diff --git a/tools/print_version.py b/tools/print_version.py |
index 65e700d3c84cfabc8fdb56989420b029f156eeee..13cbf750793044c252a0aa004e7feae38611f8f7 100755 |
--- a/tools/print_version.py |
+++ b/tools/print_version.py |
@@ -13,8 +13,12 @@ |
import sys |
import utils |
-def Main(argv): |
- print(utils.GetVersion()) |
+def Main(): |
+ version = utils.GetVersion() |
+ if not version: |
+ print 'Error: Couldn\'t determine version string.' |
+ return 1 |
+ print version |
if __name__ == '__main__': |
- sys.exit(Main(sys.argv)) |
+ sys.exit(Main()) |