# HG changeset patch # User Paul Boddie # Date 1457113737 -3600 # Node ID 462c557ca50a3e313fdef18ba819209979ff0a20 # Parent 5f9f96eb4f8f82aaa0de102ecf973d581732da08 Removed redundant table access operation overriding. diff -r 5f9f96eb4f8f -r 462c557ca50a imip_store.py --- a/imip_store.py Tue Feb 09 15:57:23 2016 +0100 +++ b/imip_store.py Fri Mar 04 18:48:57 2016 +0100 @@ -572,7 +572,7 @@ # Free/busy period access. - def get_freebusy(self, user, name=None, get_table=None): + def get_freebusy(self, user, name=None): "Get free/busy details for the given 'user'." @@ -581,9 +581,9 @@ return [] else: return map(lambda t: FreeBusyPeriod(*t), - (get_table or self._get_table_atomic)(user, filename, [(4, None)])) + self._get_table_atomic(user, filename, [(4, None)])) - def get_freebusy_for_other(self, user, other, get_table=None): + def get_freebusy_for_other(self, user, other): "For the given 'user', get free/busy details for the 'other' user." @@ -592,9 +592,9 @@ return [] else: return map(lambda t: FreeBusyPeriod(*t), - (get_table or self._get_table_atomic)(user, filename, [(4, None)])) + self._get_table_atomic(user, filename, [(4, None)])) - def set_freebusy(self, user, freebusy, name=None, set_table=None): + def set_freebusy(self, user, freebusy, name=None): "For the given 'user', set 'freebusy' details." @@ -602,11 +602,11 @@ if not filename: return False - (set_table or self._set_table_atomic)(user, filename, + self._set_table_atomic(user, filename, map(lambda fb: fb.as_tuple(strings_only=True), freebusy)) return True - def set_freebusy_for_other(self, user, freebusy, other, set_table=None): + def set_freebusy_for_other(self, user, freebusy, other): "For the given 'user', set 'freebusy' details for the 'other' user." @@ -614,7 +614,7 @@ if not filename: return False - (set_table or self._set_table_atomic)(user, filename, + self._set_table_atomic(user, filename, map(lambda fb: fb.as_tuple(strings_only=True), freebusy)) return True @@ -1006,7 +1006,7 @@ # Free/busy period access for users within quota groups. - def get_freebusy(self, quota, user, get_table=None): + def get_freebusy(self, quota, user): "Get free/busy details for the given 'quota' and 'user'." @@ -1015,9 +1015,9 @@ return [] return map(lambda t: FreeBusyPeriod(*t), - (get_table or self._get_table_atomic)(quota, filename, [(4, None)])) + self._get_table_atomic(quota, filename, [(4, None)])) - def set_freebusy(self, quota, user, freebusy, set_table=None): + def set_freebusy(self, quota, user, freebusy): "For the given 'quota' and 'user', set 'freebusy' details." @@ -1025,7 +1025,7 @@ if not filename: return False - (set_table or self._set_table_atomic)(quota, filename, + self._set_table_atomic(quota, filename, map(lambda fb: fb.as_tuple(strings_only=True), freebusy)) return True