瀏覽代碼

[fs] Stringify the user to get proper username key

Romain Rigaux 4 年之前
父節點
當前提交
c8a36260ee
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      desktop/core/src/desktop/lib/fsmanager.py
  2. 4 4
      desktop/libs/aws/src/aws/s3/s3connection.py

+ 1 - 1
desktop/core/src/desktop/lib/fsmanager.py

@@ -46,7 +46,7 @@ _DEFAULT_USER = DEFAULT_USER.get()
 # FIXME: Should we check hue principal for the default user?
 # FIXME: Caching via username has issues when users get deleted. Need to switch to userid, but bigger change
 def _get_cache_key(fs, identifier, user=_DEFAULT_USER):
-  return fs + ':' + identifier + ':' + user
+  return fs + ':' + identifier + ':' + str(user)
 
 
 def clear_cache():

+ 4 - 4
desktop/libs/aws/src/aws/s3/s3connection.py

@@ -107,15 +107,15 @@ class RazS3Connection(SignedUrlS3Connection):
     if isinstance(key, Key):
         key = key.name
     path = self.calling_format.build_path_base(bucket, key)
-    boto.log.debug('path=%s' % path)
+    LOG.debug('path=%s' % path)
     auth_path = self.calling_format.build_auth_path(bucket, key)
-    boto.log.debug('auth_path=%s' % auth_path)
+    LOG.debug('auth_path=%s' % auth_path)
     host = self.calling_format.build_host(self.server_name(), bucket)
     if query_args:
         path += '?' + query_args
-        boto.log.debug('path=%s' % path)
+        LOG.debug('path=%s' % path)
         auth_path += '?' + query_args
-        boto.log.debug('auth_path=%s' % auth_path)
+        LOG.debug('auth_path=%s' % auth_path)
 
     params = {}
     http_request = self.build_base_http_request(method, path, auth_path,