summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Admin/Snapshots.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/Server/Admin/Snapshots.py b/src/lib/Server/Admin/Snapshots.py
index abfcc73b2..fc3334c11 100644
--- a/src/lib/Server/Admin/Snapshots.py
+++ b/src/lib/Server/Admin/Snapshots.py
@@ -2,7 +2,6 @@ import Bcfg2.Server.Admin
import sqlalchemy, sqlalchemy.orm
import Bcfg2.Server.Snapshots
import Bcfg2.Server.Snapshots.model
-from sqlalchemy.ext.declarative import declarative_base
class Snapshots(Bcfg2.Server.Admin.Mode):
__shorthelp__ = "Interact with the Snapshots system"
@@ -31,8 +30,7 @@ class Snapshots(Bcfg2.Server.Admin.Mode):
elif args[0] == 'init':
dbpath = Bcfg2.Server.Snapshots.db_from_config()
engine = sqlalchemy.create_engine(dbpath, echo=True)
- Base = declarative_base()
- metadata = Base.metadata
+ metadata = Bcfg2.Server.Snapshots.model.Base.metadata
metadata.create_all(engine)
Session = sqlalchemy.orm.sessionmaker()
Session.configure(bind=engine)