Browse Source

Bugfix in argparsing

Yann Weber 6 years ago
parent
commit
f4581b0023
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      gte/__main__.py

+ 4
- 1
gte/__main__.py View File

224
             logger.debug('P%d : %s' % (pid, str(prog)))
224
             logger.debug('P%d : %s' % (pid, str(prog)))
225
         generation += 1
225
         generation += 1
226
     exit(0)
226
     exit(0)
227
-else:
227
+elif 'output_dir' in args:
228
     # Generate
228
     # Generate
229
     if args.output_dir is not None:
229
     if args.output_dir is not None:
230
         from PIL import Image
230
         from PIL import Image
318
 
318
 
319
     w.save(args.output)
319
     w.save(args.output)
320
     logger.info('Image saved in %s' % args.output)
320
     logger.info('Image saved in %s' % args.output)
321
+else:
322
+    parser.print_help()
323
+    exit(1)
321
 
324
 
322
 exit(0)
325
 exit(0)

Loading…
Cancel
Save