You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Administrivia
setup.py: don't need to import pkg_resources pydisassemble: give an error is no file or directory is given usage should go to stderr, not stdout
This commit is contained in:
@@ -41,6 +41,10 @@ check_python_version(program)
|
||||
outfile = '-'
|
||||
out_base = None
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
print("No file(s) or directory given", file=sys.stderr)
|
||||
print(Usage_short, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
opts, files = getopt.getopt(sys.argv[1:], 'hVo:', ['help', 'version'])
|
||||
@@ -59,9 +63,10 @@ for opt, val in opts:
|
||||
outfile = val
|
||||
else:
|
||||
print(opt)
|
||||
print(Usage_short)
|
||||
print(Usage_short, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# argl, commonprefix works on strings, not on path parts,
|
||||
# thus we must handle the case with files in 'some/classes'
|
||||
# and 'some/cmds'
|
||||
|
Reference in New Issue
Block a user