OneTime icon indicating copy to clipboard operation
OneTime copied to clipboard

Cleaner IOError

Open ghost opened this issue 9 years ago • 1 comments

Made OneTime output a cleaner error for when it can't access a file during reading (such as when it doesn't exist). Before it was just spewing out a Python IOError.

ghost avatar Jun 26 '16 05:06 ghost

Hi, @beardog108 -- thanks for the PR! Comments:

  • I think your cleanup commit 49f7865 forgot to restore the word "try" in the doc string :-).
  • The new error message should start with "Error: ", to match the others printed with sys.stderr.write() (as opposed to using raise).
  • Could you add a new regression test for the error in check.sh?

I ran the test suite with the changes, and it passes all current tests. It just needs a new test to verify that the error is produced when expected.

kfogel avatar Jun 27 '16 18:06 kfogel