diff options
Diffstat (limited to 'libbe/bugdir.py')
-rw-r--r-- | libbe/bugdir.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libbe/bugdir.py b/libbe/bugdir.py index a5d384d..a694e89 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -133,8 +133,8 @@ class BugDir (list, settings_object.SavedSettingsObject): def inactive_status(): return {} def _extra_strings_check_fn(value): - return utility.iterable_full_of_strings(value, \ - alternative=settings_object.EMPTY) + return utility.iterable_full_of_strings(value, + alternative=settings_object.EMPTY) def _extra_strings_change_hook(self, old, new): self.extra_strings.sort() # to make merging easier self._prop_save_settings(old, new) @@ -175,7 +175,7 @@ class BugDir (list, settings_object.SavedSettingsObject): else: if self.uuid is None: self.uuid = libbe.util.id.uuid_gen() - if self.storage != None and self.storage.is_writeable(): + if self.storage is not None and self.storage.is_writeable(): self.save() # methods for saving/loading/accessing settings and properties. @@ -235,7 +235,7 @@ class BugDir (list, settings_object.SavedSettingsObject): def _refresh_uuid_cache(self): self._uuids_cache = set() # list bugs that are in storage - if self.storage != None and self.storage.is_readable(): + if self.storage is not None and self.storage.is_readable(): child_uuids = libbe.util.id.child_uuids( self.storage.children(self.id.storage())) for id in child_uuids: @@ -274,7 +274,7 @@ class BugDir (list, settings_object.SavedSettingsObject): if hasattr(self, '_uuids_cache') and bug.uuid in self._uuids_cache: self._uuids_cache.remove(bug.uuid) self.remove(bug) - if self.storage != None and self.storage.is_writeable(): + if self.storage is not None and self.storage.is_writeable(): bug.remove() def bug_from_uuid(self, uuid): @@ -752,12 +752,12 @@ if libbe.TESTING: bug_b.creator = 'Jane Doe <jdoe@example.com>' bug_b.time = 0 bug_b.status = 'closed' - if self.storage != None: + if self.storage is not None: self.storage.disconnect() # flush to storage self.storage.connect() def cleanup(self): - if self.storage != None: + if self.storage is not None: self.storage.writeable = True self.storage.disconnect() self.storage.destroy() @@ -765,7 +765,7 @@ if libbe.TESTING: self._dir_ref.cleanup() def flush_reload(self): - if self.storage != None: + if self.storage is not None: self.storage.disconnect() self.storage.connect() self._clear_bugs() @@ -885,7 +885,7 @@ if libbe.TESTING: self.storage.disconnect() self.storage.connect() def tearDown(self): - if self.storage != None: + if self.storage is not None: self.storage.disconnect() self.storage.destroy() self.dir.cleanup() |