Commit 6c83997e authored by Florian Pritz's avatar Florian Pritz
Browse files

Only initialize default DB when no db is passed

Having the default parameter in the parameter list always initializes
the class. That's not what we want here since it actually create a real
database when running the tests.
Signed-off-by: Florian Pritz's avatarFlorian Pritz <>
parent 9c17dead
......@@ -21,10 +21,12 @@ class ArchiveUploader:
See the <a href="">Arch Linux Archive documentation</a> for details.
def __init__(self, internetarchive = ia, db = DB.DB('archive-uploader.sqlite')):
def __init__(self, internetarchive = ia, db = None):
self.ia = internetarchive
self.db = db
self.chunksize = 20
if self.db is None:
self.db = DB.DB('archive-uploader.sqlite')
def clean_name(self, name):
"""Remove chars that are not allowed in an Internet Archive identifier: @.+
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment