summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2010-02-08 19:24:37 +0000
committerSol Jerome <solj@ices.utexas.edu>2010-02-08 19:24:37 +0000
commit42cffe6228369a75f27c14eea22ad13baf2c0854 (patch)
treeed3a19a831c3b54b9d472671814d7bf77ab16eb5 /src/lib/Server/Admin
parent8f265b38c7798d7933173d4dcbe9e6b3ad736c4c (diff)
downloadbcfg2-42cffe6228369a75f27c14eea22ad13baf2c0854.tar.gz
bcfg2-42cffe6228369a75f27c14eea22ad13baf2c0854.tar.bz2
bcfg2-42cffe6228369a75f27c14eea22ad13baf2c0854.zip
Snapshots: Use custom bcfg2.conf when specified (Fix for #839)
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5716 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Admin')
-rw-r--r--src/lib/Server/Admin/Snapshots.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Server/Admin/Snapshots.py b/src/lib/Server/Admin/Snapshots.py
index a68dec30d..004de0ddb 100644
--- a/src/lib/Server/Admin/Snapshots.py
+++ b/src/lib/Server/Admin/Snapshots.py
@@ -23,7 +23,8 @@ class Snapshots(Bcfg2.Server.Admin.Mode):
def __init__(self, configfile):
Bcfg2.Server.Admin.Mode.__init__(self, configfile)
#self.session = Bcfg2.Server.Snapshots.setup_session(debug=True)
- self.session = Bcfg2.Server.Snapshots.setup_session()
+ self.session = Bcfg2.Server.Snapshots.setup_session(configfile)
+ self.cfile = configfile
def __call__(self, args):
Bcfg2.Server.Admin.Mode.__call__(self, args)
@@ -59,7 +60,7 @@ class Snapshots(Bcfg2.Server.Admin.Mode):
raise SystemExit(1)
elif args[0] == 'init':
# Initialize the Snapshots database
- dbpath = Bcfg2.Server.Snapshots.db_from_config()
+ dbpath = Bcfg2.Server.Snapshots.db_from_config(self.cfile)
engine = sqlalchemy.create_engine(dbpath, echo=True)
metadata = Base.metadata
metadata.create_all(engine)