diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/carquinyol/indexstore.py | 2 | ||||
-rw-r--r-- | src/carquinyol/layoutmanager.py | 8 |
4 files changed, 13 insertions, 3 deletions
@@ -1,3 +1,7 @@ +v0.87.1 2009-12-01 +* Make reading version file more robust (sayamindu) #1562 +* Use gobject_timeout_add_seconds to make power usage more efficient (sayamindu) #1567 + v0.86.1 2009-10-01 * Screenshot file is not deleted #1445 diff --git a/configure.ac b/configure.ac index a003cfa..c5eab2f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([sugar-datastore],[0.86.1],[],[sugar-datastore]) +AC_INIT([sugar-datastore],[0.87.1],[],[sugar-datastore]) AC_PREREQ([2.59]) diff --git a/src/carquinyol/indexstore.py b/src/carquinyol/indexstore.py index 1a9f838..d390872 100644 --- a/src/carquinyol/indexstore.py +++ b/src/carquinyol/indexstore.py @@ -312,5 +312,5 @@ class IndexStore(object): self._database.flush() self._pending_writes = 0 else: - self._flush_timeout = gobject.timeout_add(_FLUSH_TIMEOUT * 1000, + self._flush_timeout = gobject.timeout_add_seconds(_FLUSH_TIMEOUT, self._flush_timeout_cb) diff --git a/src/carquinyol/layoutmanager.py b/src/carquinyol/layoutmanager.py index acee83d..1f2dd4c 100644 --- a/src/carquinyol/layoutmanager.py +++ b/src/carquinyol/layoutmanager.py @@ -15,6 +15,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import os +import logging MAX_QUERY_LIMIT = 40960 CURRENT_LAYOUT_VERSION = 2 @@ -54,7 +55,12 @@ class LayoutManager(object): version_path = os.path.join(self._root_path, 'version') version = 0 if os.path.exists(version_path): - version = int(open(version_path, 'r').read()) + try: + version = int(open(version_path, 'r').read()) + except ValueError: + logging.exception('Can not read layout version') + version = 0 + return version def set_version(self, version): |