1. Nikolaj Šujskij
  2. rst2epub

Commits

Nikolaj Šujskij  committed 5c20a58

Check if input file exists

  • Participants
  • Parent commits e57e9cb
  • Branches default

Comments (0)

Files changed (1)

File rst2epub/converter.py

View file
  • Ignore whitespace
         sys.stderr.write("Invalid argument number\n")
         sys.exit(1)
     rstfile, epubfile = sys.argv[1:]
+    if not (os.path.exists(rstfile) and os.path.isfile(rstfile)):
+        sys.stderr.write("Input file does not exist or is not a file\n")
+        sys.exit(1)
     main(rstfile, epubfile)