OSDN Git Service

[dexter] Require python >= 3.6
authorDjordje Todorovic <djordje.todorovic@syrmia.com>
Thu, 23 Apr 2020 07:49:02 +0000 (09:49 +0200)
committerDjordje Todorovic <djordje.todorovic@syrmia.com>
Thu, 23 Apr 2020 09:46:10 +0000 (11:46 +0200)
The documentation says we need python >= 3.6. Running it with an older
version, we get verbose output from python interpreter.
This patch fixes that as:

  $ python2 dexter.py list-debuggers
  You need python 3.6 or later to run DExTer

Differential Revision: https://reviews.llvm.org/D78621

debuginfo-tests/dexter/dexter.py

index 3670caf..8190a4b 100755 (executable)
@@ -9,6 +9,11 @@
 
 import sys
 
+if sys.version_info < (3, 6, 0):
+    sys.stderr.write("You need python 3.6 or later to run DExTer\n")
+    # Equivalent to sys.exit(ReturnCode._ERROR).
+    sys.exit(1)
+
 from dex.tools import main
 
 if __name__ == '__main__':