Showing the changes to python/scripts (1 of 1 file). Show all
Unified · Split
| @@ -114,8 +114,12 @@ def parse_args(): · 113 unmodified lines | |||
| 114 | help="be quiet") | 114 | help="be quiet") |
| 115 | (options, args) = parser.parse_args() | 115 | (options, args) = parser.parse_args() |
| 116 | if not options.source_file: | 116 | if not options.source_file: |
| 117 | print "no file name given\n", usage | 117 | import os.path |
| 118 | sys.exit(1) | 118 | if len(args) == 1: |
| 119 | options.source_file = args[0] | ||
| 120 | else: | ||
| 121 | print "no file name given\n", usage | ||
| 122 | sys.exit(1) | ||
| 119 | return options, args | 123 | return options, args |
| 120 | 124 | ||
| 121 | if __name__ == '__main__': | 125 | if __name__ == '__main__': |