Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify file permission error message #1692

Merged
merged 1 commit into from
May 20, 2016
Merged

Conversation

xrmx
Copy link
Contributor

@xrmx xrmx commented May 19, 2016

Make it clear that permission should either be 'r' or 'w'.

The original "r/w" suggestion was not clear to me, was passing 'w+' originally, then interpreted the error as a request to use 'rw' until i looked at the actual source code :)

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @ajornetic3, @freider and @bmaggard to be potential reviewers

@bmaggard
Copy link
Contributor

I like it, but while making the change, why not also them consistent? I like the one I switched to back on PR #1456 (b/c: "(got: %s)"), but that can be reverted if others don't:

raise Exception("mode must be 'r' or 'w' (got: %s)" % mode)

Make it clear that permission should either be 'r' or 'w'.
@xrmx
Copy link
Contributor Author

xrmx commented May 19, 2016

@bmaggard updated pull request to make them consistent.

@codecov-io
Copy link

codecov-io commented May 19, 2016

Current coverage is 76.10%

Merging #1692 into master will decrease coverage by 2.71%

@@             master      #1692   diff @@
==========================================
  Files            94         94          
  Lines         10285      10285          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           8106       7827   -279   
- Misses         2179       2458   +279   
  Partials          0          0          

Powered by Codecov. Last updated by 2a0ff1f...b41192f

@bmaggard
Copy link
Contributor

This is good-to-go as far as I'm concerned.

@dlstadther
Copy link
Collaborator

No real critiques here. Improved error reporting 👍

@Tarrasch Tarrasch merged commit 5f570ad into spotify:master May 20, 2016
@Tarrasch
Copy link
Contributor

This looks very good, thanks!

One thing we should fix is that it shouldn't be such a general exception as Exception() right?

This was referenced Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants