-
- output_dir = output_file = None
- if options.output_dir:
- output_dir = options.output_dir
- elif options.output_file:
- output_file = options.output_file
+ if not (options.output_file or options.output_dir):
+ output_file = os.path.splitext(main_input)[0] + '.mobi'