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:
rocky
2016-05-06 06:01:10 -04:00
parent 163dfd888d
commit 15b2a742e9
2 changed files with 6 additions and 2 deletions

View File

@@ -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'

View File

@@ -8,7 +8,6 @@ from __pkginfo__ import \
modname, packages, py_modules, scripts, \
short_desc, web, zip_safe
__import__('pkg_resources')
from setuptools import setup
exec(open('uncompyle6/version.py').read())