[Pkg-debile-commits] [debile-master] 01/01: More renaming and removing dead code
Léo Cavaillé
leo.cavaille-guest at alioth.debian.org
Thu Aug 22 22:03:38 UTC 2013
This is an automated email from the git hooks/post-receive script.
leo.cavaille-guest pushed a commit to branch master
in repository debile-master.
commit f972c5e0946c9d120e66ebd935caa52e899c6706
Author: Léo Cavaillé <leo at cavaille.net>
Date: Fri Aug 23 00:02:47 2013 +0200
More renaming and removing dead code
---
debile/master/cli/init.py | 18 +++++++++---------
debile/master/cli/nuke.py | 29 -----------------------------
2 files changed, 9 insertions(+), 38 deletions(-)
diff --git a/debile/master/cli/init.py b/debile/master/cli/init.py
index f48e98f..6da8f23 100644
--- a/debile/master/cli/init.py
+++ b/debile/master/cli/init.py
@@ -1,15 +1,15 @@
from clint.textui import progress, puts
from clint import args
-import lucy.orm as lucymodel
+import debile.master.orm as debilemodel
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
-from lucy.config import Config
+from debile.master.config import Config
import json
import shutil
import os
-metadata = lucymodel.Base.metadata
+metadata = debilemodel.Base.metadata
def main():
config = Config()
@@ -42,12 +42,12 @@ def main():
print "Could not delete"
metadata.create_all(bind=engine)
- initialadmin = lucymodel.User(login='admin',
- password='admin',
- name='Initial Administrator',
- gpg_fingerprint='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
- email='admin at debuild.me',
- admin=True)
+ initialadmin = debilemodel.User(login='admin',
+ password='admin',
+ name='Initial Administrator',
+ gpg_fingerprint='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
+ email='admin at debuild.me',
+ admin=True)
session.add(initialadmin)
session.commit()
print "Create the pool"
diff --git a/debile/master/cli/nuke.py b/debile/master/cli/nuke.py
deleted file mode 100644
index cb2fb1e..0000000
--- a/debile/master/cli/nuke.py
+++ /dev/null
@@ -1,29 +0,0 @@
-from lucy.models.config import Config
-from lucy.core import db
-
-from clint.textui import puts
-import shutil
-import sys
-import os
-
-
-def main():
- try:
- conf = Config.load('default')
- except KeyError:
- puts("Error: Need to init the db")
- sys.exit(1)
-
- pool = conf['pool']
-
- shutil.rmtree(pool)
- os.makedirs(pool)
-
- for x in db.collection_names():
- if x.startswith('system'):
- continue
- db.drop_collection(x)
-
-
-if __name__ == "__main__":
- main()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git
More information about the Pkg-debile-commits
mailing list