summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Reporting/Storage/__init__.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-06-27 10:32:04 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-06-27 10:41:53 -0400
commit7e43d4af98a12e5685f250bf2161fc7afebe02a1 (patch)
treec01973d3dcf075b394c7dec66a1a45894d8c9f4d /src/lib/Bcfg2/Reporting/Storage/__init__.py
parent4261f7238e3b7eb169fcb0f672e7fdb86d722189 (diff)
downloadbcfg2-7e43d4af98a12e5685f250bf2161fc7afebe02a1.tar.gz
bcfg2-7e43d4af98a12e5685f250bf2161fc7afebe02a1.tar.bz2
bcfg2-7e43d4af98a12e5685f250bf2161fc7afebe02a1.zip
Options: migrated reporting to new parser
Diffstat (limited to 'src/lib/Bcfg2/Reporting/Storage/__init__.py')
-rw-r--r--src/lib/Bcfg2/Reporting/Storage/__init__.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/lib/Bcfg2/Reporting/Storage/__init__.py b/src/lib/Bcfg2/Reporting/Storage/__init__.py
index 85356fcfe..953104d4b 100644
--- a/src/lib/Bcfg2/Reporting/Storage/__init__.py
+++ b/src/lib/Bcfg2/Reporting/Storage/__init__.py
@@ -1,32 +1,3 @@
"""
Public storage routines
"""
-
-import traceback
-
-from Bcfg2.Reporting.Storage.base import StorageError, \
- StorageImportError
-
-def load_storage(storage_name, setup):
- """
- Try to load the storage. Raise StorageImportError on failure
- """
- try:
- mod_name = "%s.%s" % (__name__, storage_name)
- mod = getattr(__import__(mod_name).Reporting.Storage, storage_name)
- except ImportError:
- try:
- mod = __import__(storage_name)
- except:
- raise StorageImportError("Unavailable")
- try:
- cls = getattr(mod, storage_name)
- return cls(setup)
- except:
- raise StorageImportError("Storage unavailable: %s" %
- traceback.format_exc().splitlines()[-1])
-
-def load_storage_from_config(setup):
- """Load the storage in the config... eventually"""
- return load_storage('DjangoORM', setup)
-