# HG changeset patch # User Paul Boddie # Date 1457555936 -3600 # Node ID 16b00c3bee0277d979c84409acac2feb05373688 # Parent c0c1af0b3ddbbba3806a1b59861438b0ba95e814 Moved generic initialisation into the store base class. diff -r c0c1af0b3ddb -r 16b00c3bee02 imiptools/stores/database.py --- a/imiptools/stores/database.py Wed Mar 09 21:33:20 2016 +0100 +++ b/imiptools/stores/database.py Wed Mar 09 21:38:56 2016 +0100 @@ -31,21 +31,21 @@ "A database store supporting user-specific locking." + def __init__(self, connection, paramstyle=None): + DatabaseOperations.__init__(self, paramstyle=paramstyle) + self.connection = connection + self.cursor = connection.cursor() + def acquire_lock(self, user, timeout=None): - FileBase.acquire_lock(self, timeout, user) + pass def release_lock(self, user): - FileBase.release_lock(self, user) + pass class DatabaseStore(DatabaseStoreBase, StoreBase, DatabaseOperations): "A database store of tabular free/busy data and objects." - def __init__(self, connection, paramstyle=None): - DatabaseOperations.__init__(self, paramstyle=paramstyle) - self.connection = connection - self.cursor = connection.cursor() - # User discovery. def get_users(self):