+MissingEnvironmentVariableError

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-06 12:52:13 +02:00
parent f262cc4ccf
commit a4abb53ced
2 changed files with 10 additions and 0 deletions

View File

@ -24,3 +24,13 @@ VERSION = "2.0.3"
class Error(Exception):
"""Base exception class for this project"""
pass
class MissingEnvironmentVariableError(Error):
"""Raised when a required environment variable is not set."""
def __init__(self, name)
self.name = name
def __str__(self):
return 'Missing required environment variable: {0.name}'.format(o)