File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,9 +19,13 @@ def main():
1919 opts , args = getopt .getopt (sys .argv [1 :], "v" )
2020 except getopt .error , msg :
2121 print msg
22+ return
2223 for o , a in opts :
2324 if o == '-v' :
2425 verbose = verbose + 1
26+ if not args :
27+ print "Usage:" , sys .argv [0 ], "file_or_directory ..."
28+ return
2529 for arg in args :
2630 check (arg )
2731
Original file line number Diff line number Diff line change @@ -19,9 +19,13 @@ def main():
1919 opts , args = getopt .getopt (sys .argv [1 :], "v" )
2020 except getopt .error , msg :
2121 print msg
22+ return
2223 for o , a in opts :
2324 if o == '-v' :
2425 verbose = verbose + 1
26+ if not args :
27+ print "Usage:" , sys .argv [0 ], "file_or_directory ..."
28+ return
2529 for arg in args :
2630 check (arg )
2731
Original file line number Diff line number Diff line change @@ -19,9 +19,13 @@ def main():
1919 opts , args = getopt .getopt (sys .argv [1 :], "v" )
2020 except getopt .error , msg :
2121 print msg
22+ return
2223 for o , a in opts :
2324 if o == '-v' :
2425 verbose = verbose + 1
26+ if not args :
27+ print "Usage:" , sys .argv [0 ], "file_or_directory ..."
28+ return
2529 for arg in args :
2630 check (arg )
2731
Original file line number Diff line number Diff line change @@ -16,13 +16,17 @@ def main():
1616 opts , args = getopt .getopt (sys .argv [1 :], "qv" )
1717 except getopt .error , msg :
1818 print msg
19+ return
1920 for o , a in opts :
2021 if o == '-v' :
2122 verbose = verbose + 1
2223 quiet = 0
2324 if o == '-q' :
2425 quiet = 1
2526 verbose = 0
27+ if not args :
28+ print "Usage:" , sys .argv [0 ], "file_or_directory ..."
29+ return
2630 for arg in args :
2731 check (arg )
2832
You can’t perform that action at this time.
0 commit comments