소스 검색

[fb] Display full HDFS exception message instead of None

Romain Rigaux 13 년 전
부모
커밋
ba43e627c7
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)