Skip to content
Permalink
Browse files
Workaround for trailing \r on some windows systems
  • Loading branch information
kovidgoyal committed Jul 8, 2018
1 parent 6959695 commit 9ea8ef518c2e8eb727d7fbc865ba5bea9cb26db4
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/calibre/utils/exim.py
@@ -385,8 +385,10 @@ def cli_report(*args, **kw):
pass


def run_exporter():
export_dir = raw_input('Enter path to an empty folder (all exported data will be saved inside it): ').decode(filesystem_encoding)
def run_exporter(export_dir=None):
export_dir = export_dir or raw_input(
'Enter path to an empty folder (all exported data will be saved inside it): ').decode(
filesystem_encoding).rstrip('\r')
if not os.path.exists(export_dir):
os.makedirs(export_dir)
if not os.path.isdir(export_dir):

0 comments on commit 9ea8ef5

Please sign in to comment.