瀏覽代碼

[fb] Display full HDFS exception message instead of None

Romain Rigaux 12 年之前
父節點
當前提交
ba43e62
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      desktop/libs/hadoop/src/hadoop/fs/upload.py

+ 5 - 2
desktop/libs/hadoop/src/hadoop/fs/upload.py

@@ -116,7 +116,7 @@ class HDFSfileUploadHandler(FileUploadHandler):
   In practice, the middlewares (which access the request.REQUEST/POST/FILES objects) triggers
   In practice, the middlewares (which access the request.REQUEST/POST/FILES objects) triggers
   the upload before reaching the view in case of permissions error. Read about Django
   the upload before reaching the view in case of permissions error. Read about Django
   uploading documentation.
   uploading documentation.
-  
+
   This might trigger the upload before executing the hue auth middleware. HDFS destination
   This might trigger the upload before executing the hue auth middleware. HDFS destination
   permissions will be doing the checks.
   permissions will be doing the checks.
   """
   """
@@ -146,7 +146,10 @@ class HDFSfileUploadHandler(FileUploadHandler):
 
 
   def receive_data_chunk(self, raw_data, start):
   def receive_data_chunk(self, raw_data, start):
     if not self._activated:
     if not self._activated:
-      return raw_data
+      if self.request.META.get('PATH_INFO') == '/filebrowser/upload/archive':
+        return raw_data
+      else:
+        raise StopUpload()
 
 
     try:
     try:
       self._file.write(raw_data)
       self._file.write(raw_data)