Kaydet (Commit) 8053d89f authored tarafından Guido van Rossum's avatar Guido van Rossum

Add usage message when no arguments.

üst f4b44fa6
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment