X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=persistent.py;h=119931b8ccba607ccc48321ac6f3d6dd3dd5b791;hb=3c05841f04d89409bb7bef6e6f8641c4ec31b803;hp=16f51c04160e8b05f7de83894b13d06cf11bc8e4;hpb=7ff2af6fe7bffea90dc4a31c93140c189917c659;p=python_utils.git diff --git a/persistent.py b/persistent.py index 16f51c0..119931b 100644 --- a/persistent.py +++ b/persistent.py @@ -150,20 +150,15 @@ class persistent_autoloaded_singleton(object): logger.debug(f'Attempting to instantiate {cls.__name__} directly.') self.instance = cls(*args, **kwargs) else: - logger.debug( - f'Class {cls.__name__} was loaded from persisted state successfully.' - ) + logger.debug(f'Class {cls.__name__} was loaded from persisted state successfully.') was_loaded = True assert self.instance is not None if self.persist_at_shutdown is PersistAtShutdown.ALWAYS or ( - not was_loaded - and self.persist_at_shutdown is PersistAtShutdown.IF_NOT_LOADED + not was_loaded and self.persist_at_shutdown is PersistAtShutdown.IF_NOT_LOADED ): - logger.debug( - 'Scheduling a deferred called to save at process shutdown time.' - ) + logger.debug('Scheduling a deferred called to save at process shutdown time.') atexit.register(self.instance.save) return self.instance