Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix key names in DictCache and logging messages in mixin.

  • Loading branch information...
commit 9be5ada9ebfc4a9830d06b00ee04de2729929327 1 parent c2e6bea
Benedict Singer authored
Showing with 8 additions and 8 deletions.
  1. +4 −4 cache.py
  2. +4 −4 mixin.py
8 cache.py
View
@@ -322,14 +322,14 @@ def add_file(self, uid, file_name, timestamp, metadata, data):
def update_file(self, uid, file_name, timestamp, metadata, data):
if self._key(uid, file_name) not in self._data_dict:
return
- self._data_dict[self._key(uid, file_name)]['timestamp'] = timestamp
- self._data_dict[self._key(uid, file_name)]['metadata'] = json.loads(metadata)
- self._data_dict[self._key(uid, file_name)]['data'] = data
+ self._data_dict[self._key(uid, file_name)]['file_metadata_ts'] = timestamp
+ self._data_dict[self._key(uid, file_name)]['file_metadata'] = json.loads(metadata)
+ self._data_dict[self._key(uid, file_name)]['file_data'] = data
def update_file_timestamp(self, uid, file_name, timestamp):
if self._key(uid, file_name) not in self._data_dict:
return
- self._data_dict[self._key(uid, file_name)]['timestamp'] = timestamp
+ self._data_dict[self._key(uid, file_name)]['file_metadata_ts'] = timestamp
def remove_file(self, uid, file_name):
if self._key(uid, file_name) not in self._data_dict:
8 mixin.py
View
@@ -265,7 +265,7 @@ def get_files(self, callback):
callback(self._files_from_metadata(user["folder_metadata"]))
def _files_from_metadata(self, metadata):
- logger.debug('metadata contents %s', (metadata["contents"]))
+ logger.debug('metadata contents %s', metadata["contents"])
return [content["path"].replace(self._get_folder_path(), "", 1).lstrip("/") for content in metadata["contents"]]
@tornado.web.authenticated
@@ -361,7 +361,7 @@ def upload_data(self, file_name, data, callback):
f = cache.get_file(uid, file_name)
- logger.debug("uploading new %s file: '%s'", (file_name, data))
+ logger.debug("uploading new %s file: '%s'", file_name, data)
if f:
logger.debug("previous rev:")
logger.debug(f["file_metadata"]["rev"])
@@ -411,7 +411,7 @@ def move_file(self, file_name, new_file_name, callback):
cache = self._get_cache()
uid = self.current_user["uid"]
- logger.debug("moving %s to %s", (file_name, new_file_name))
+ logger.debug("moving %s to %s", file_name, new_file_name)
response = yield tornado.gen.Task(self.dropbox_request,
"api", "/1/fileops/move",
@@ -439,7 +439,7 @@ def delete_file(self, file_name, callback):
cache = self._get_cache()
uid = self.current_user["uid"]
- logger.debug("deleting %s", (file_name))
+ logger.debug("deleting %s", file_name)
response = yield tornado.gen.Task(self.dropbox_request,
"api", "/1/fileops/delete",
Please sign in to comment.
Something went wrong with that request. Please try again.