[gobject-introspection] Fix giscanner crash with no cache directory



commit 9a24233bed0e64b34f47f78e094df918fc85dcaf
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Aug 12 10:01:37 2010 +1000

    Fix giscanner crash with no cache directory

 giscanner/cachestore.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/cachestore.py b/giscanner/cachestore.py
index d839ef5..d72eee4 100644
--- a/giscanner/cachestore.py
+++ b/giscanner/cachestore.py
@@ -76,6 +76,9 @@ class CacheStore(object):
         self._check_cache_version()
 
     def _check_cache_version(self):
+        if self._directory is None:
+            return
+
         current_hash = _get_versionhash()
         version = os.path.join(self._directory, _CACHE_VERSION_FILENAME)
         try:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]