def __enter__(self): try: self.__db = dbm.open(".bob-adb", 'c') except dbm.error as e: raise BobError("Cannot open cache: " + str(e)) return self