Allow db_module and block_module to be None
authorGiorgos Verigakis <verigak@gmail.com>
Fri, 9 Dec 2011 11:23:43 +0000 (13:23 +0200)
committerGiorgos Verigakis <verigak@gmail.com>
Fri, 9 Dec 2011 11:23:43 +0000 (13:23 +0200)
And use sqlalchemy and hash filer as default
options.

pithos/backends/modular.py

index 135a819..12a08f0 100644 (file)
@@ -78,6 +78,9 @@ class ModularBackend(BaseBackend):
     """
     
     def __init__(self, db_module, db_connection, block_module, block_path):
+        db_module = db_module or 'pithos.backends.lib.sqlalchemy'
+        block_module = block_module or 'pithos.backends.lib.hashfiler'
+        
         self.hash_algorithm = 'sha256'
         self.block_size = 4 * 1024 * 1024 # 4MB