From c390d23cd3aca19cf148ae27fbfb87e642103067 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Sat, 15 Dec 2007 19:18:51 +0000 Subject: Revert "#2545: Just log a warning when unmounting a device that has already been removed." Marco has expressed concerns about this patch. Reverting until we agree on this. This reverts commit 05f0b1c82be71c342551e2bdc2f7f927f6215beb. --- diff --git a/src/olpc/datastore/backingstore.py b/src/olpc/datastore/backingstore.py index c8e90aa..12dc582 100644 --- a/src/olpc/datastore/backingstore.py +++ b/src/olpc/datastore/backingstore.py @@ -22,8 +22,6 @@ import threading import errno import shutil import urllib -import traceback -import sys import dbus import xapian @@ -269,13 +267,11 @@ class FileBackingStore(BackingStore): if 'uri' not in desc: desc['uri'] = self.uri if 'title' not in desc: desc['title'] = self.uri - try: - fp = open(fn, 'w') - pickle.dump(desc, fp) - fp.close() - except Exception: - logging.error('Unable to write descriptor:\n' + \ - ''.join(traceback.format_exception(*sys.exc_info()))) + + fp = open(fn, 'w') + pickle.dump(desc, fp) + fp.close() + @staticmethod def parse(uri): diff --git a/src/olpc/datastore/xapianindex.py b/src/olpc/datastore/xapianindex.py index a859aa9..d071eba 100644 --- a/src/olpc/datastore/xapianindex.py +++ b/src/olpc/datastore/xapianindex.py @@ -22,7 +22,6 @@ import time import thread import threading import warnings -import traceback import secore import xapian as _xapian # we need to modify the QueryParser @@ -166,11 +165,7 @@ class IndexManager(object): self.deltact += 1 if force or self.deltact > FLUSH_THRESHOLD: with self._write_lock: - try: - self.write_index.flush() - except Exception: - logging.error('Index flush failed:\n' + \ - ''.join(traceback.format_exception(*sys.exc_info()))) + self.write_index.flush() #self.read_index.reopen() self.deltact = 0 else: -- cgit v0.9.1