From e173c8084fbe81dee73fe76cc8f7383d44fbe306 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 7 May 2010 17:10:58 +0200 Subject: [PATCH] [entropy.cache] catch AttributeError, variable can be None --- libraries/entropy/cache.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/entropy/cache.py b/libraries/entropy/cache.py index 08105bfb4..94c23c696 100644 --- a/libraries/entropy/cache.py +++ b/libraries/entropy/cache.py @@ -152,7 +152,11 @@ class EntropyCacher(Singleton): __alive becomes False. """ # make sure our set delay is respected - self.__cache_writer.set_delay(EntropyCacher.WRITEBACK_TIMEOUT) + try: + self.__cache_writer.set_delay(EntropyCacher.WRITEBACK_TIMEOUT) + except AttributeError: + # can be None + pass while self.__alive or run_until_empty: