mirror of https://github.com/python/cpython
Add usage message when no arguments.
This commit is contained in:
parent
f4b44fa6ef
commit
8053d89f7b
|
@ -19,9 +19,13 @@ def main():
|
|||
opts, args = getopt.getopt(sys.argv[1:], "v")
|
||||
except getopt.error, msg:
|
||||
print msg
|
||||
return
|
||||
for o, a in opts:
|
||||
if o == '-v':
|
||||
verbose = verbose + 1
|
||||
if not args:
|
||||
print "Usage:", sys.argv[0], "file_or_directory ..."
|
||||
return
|
||||
for arg in args:
|
||||
check(arg)
|
||||
|
||||
|
|
|
@ -19,9 +19,13 @@ def main():
|
|||
opts, args = getopt.getopt(sys.argv[1:], "v")
|
||||
except getopt.error, msg:
|
||||
print msg
|
||||
return
|
||||
for o, a in opts:
|
||||
if o == '-v':
|
||||
verbose = verbose + 1
|
||||
if not args:
|
||||
print "Usage:", sys.argv[0], "file_or_directory ..."
|
||||
return
|
||||
for arg in args:
|
||||
check(arg)
|
||||
|
||||
|
|
|
@ -19,9 +19,13 @@ def main():
|
|||
opts, args = getopt.getopt(sys.argv[1:], "v")
|
||||
except getopt.error, msg:
|
||||
print msg
|
||||
return
|
||||
for o, a in opts:
|
||||
if o == '-v':
|
||||
verbose = verbose + 1
|
||||
if not args:
|
||||
print "Usage:", sys.argv[0], "file_or_directory ..."
|
||||
return
|
||||
for arg in args:
|
||||
check(arg)
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ def main():
|
|||
opts, args = getopt.getopt(sys.argv[1:], "qv")
|
||||
except getopt.error, msg:
|
||||
print msg
|
||||
return
|
||||
for o, a in opts:
|
||||
if o == '-v':
|
||||
verbose = verbose + 1
|
||||
|
@ -23,6 +24,9 @@ def main():
|
|||
if o == '-q':
|
||||
quiet = 1
|
||||
verbose = 0
|
||||
if not args:
|
||||
print "Usage:", sys.argv[0], "file_or_directory ..."
|
||||
return
|
||||
for arg in args:
|
||||
check(arg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue