Edd Barrett  committed 96c76bb

Remove existing check for pypy as it is now checked earlier.

  • Participants
  • Parent commits a69a335
  • Branches argparse-collect

Comments (0)

Files changed (3)

File _jitviewer/

 #!/usr/bin/env pypy
+from _jitviewer.misc import failout
 DESCR = """Jit Viewer: A web-based browser for PyPy log files"""
     return os.path.abspath(path)
 def main(argv, run_app=True):
-    if not '__pypy__' in sys.builtin_module_names:
-        print "Please run it using pypy-c"
-        sys.exit(1)
     parser = argparse.ArgumentParser(
             description = DESCR,
             epilog = EPILOG,

File _jitviewer/

+import sys
+def failout(msg, exit_status = 1):
+    print("error: %s" % (msg, ))
+    sys.exit(exit_status)

File bin/

 pythonpath = os.path.dirname(os.path.dirname(script_path))
-# Check we are running with PyPy
-if "pypy" not in os.path.basename(sys.executable):
-    print("error: jitviewer must be run with PyPy")
-    sys.exit(1)
+# Check we are running with PyPy first.
+if not '__pypy__' in sys.builtin_module_names:
+    from _jitviewer.misc import failout
+    failout("jitviewer must be run with PyPy")
 from import main