Projects STRLCPY linuxprivchecker Commits d6ce7974
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    linuxprivchecker.py
    skipped 18 lines
    19 19  ###############################################################################################################
    20 20   
    21 21  # conditional import for older versions of python not compatible with subprocess
    22  -try:
     22 +from sys import version_info
     23 +if version_info >= (3,5):
    23 24   #import subprocess as sub
    24 25   from subprocess import run, PIPE
    25 26   compatmode = 0 # newer version of python, no need for compatibility mode
    26  -except ImportError:
     27 +elif version_info >= (3,):
    27 28   #import os # older version of python, need to use ### instead
    28 29   from subprocess import check_output, PIPE
    29 30   compatmode = 1
     31 +else:
     32 + print("Error: please run in python3 only.")
    30 33   
    31 34  # title / formatting
    32 35  bigline = "=" * 80
    skipped 225 lines
Please wait...
Page is in error, reload to recover