From 6a2218acb0b1dfc068473ed140b4308af283a3f8 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Mon, 22 Oct 2012 00:25:00 +0200 Subject: Bug fix in drop base function. The wrong database name was used. --- source/mongodb.py | 4 ++-- source/pyAggr3g470r.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/mongodb.py b/source/mongodb.py index 64bd9218..95d7560c 100644 --- a/source/mongodb.py +++ b/source/mongodb.py @@ -227,11 +227,11 @@ class Articles(object): return collections # Functions on database - def drop_database(self): + def drop_database(self, db_name="pyaggr3g470r"): """ Drop all the database """ - self.connection.drop_database('pyaggr3g470r') + self.connection.drop_database(db_name) if __name__ == "__main__": diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index 2fac78e0..6a71b7f2 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -1206,7 +1206,7 @@ class pyAggr3g470r(object): """ Delete all articles. """ - self.mongo.drop_database() + self.mongo.drop_database(conf.MONGODB_DBNAME) return self.index() drop_base.exposed = True -- cgit