diff options
author | cedricbonhomme <devnull@localhost> | 2012-10-22 00:25:00 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-10-22 00:25:00 +0200 |
commit | 6a2218acb0b1dfc068473ed140b4308af283a3f8 (patch) | |
tree | 89e8f2ac17500a21972f8b57fa8e51691d821a05 | |
parent | Authentication is now required for all pages. (diff) | |
download | newspipe-6a2218acb0b1dfc068473ed140b4308af283a3f8.tar.gz newspipe-6a2218acb0b1dfc068473ed140b4308af283a3f8.tar.bz2 newspipe-6a2218acb0b1dfc068473ed140b4308af283a3f8.zip |
Bug fix in drop base function. The wrong database name was used.
-rw-r--r-- | source/mongodb.py | 4 | ||||
-rwxr-xr-x | source/pyAggr3g470r.py | 2 |
2 files changed, 3 insertions, 3 deletions
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 |