From a4abb53ced22a5af16b6f0d68c90146c9e3dd423 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 6 Oct 2011 12:52:13 +0200 Subject: [PATCH] +MissingEnvironmentVariableError Signed-off-by: Steven Armstrong --- lib/cdist/__init__.py | 10 ++++++++++ oo.py => lib/cdist/core/object.py | 0 2 files changed, 10 insertions(+) rename oo.py => lib/cdist/core/object.py (100%) diff --git a/lib/cdist/__init__.py b/lib/cdist/__init__.py index a0ca2ba2..864b4f37 100644 --- a/lib/cdist/__init__.py +++ b/lib/cdist/__init__.py @@ -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) diff --git a/oo.py b/lib/cdist/core/object.py similarity index 100% rename from oo.py rename to lib/cdist/core/object.py