The title pretty much sums it up already.
I have a piece of code that calls os.getenv to get both a URL as well as a token in order to connect to a service. The code lives in a module and will only be imported from there, i.e. it's not a script.
It's not a huge issue at all, since I really only need to crash and display the message saying that there are unset values, but it got me thinking about which of Python's built-in exceptions would be the best fit.
I found the EnvironmentError, but that seems to function as base class from which IOError and other OS related exceptions inherit.
Would it be as simple as a ValueError, as it's really just a value that's missing?
Thanks!