Browse Source

[fb] Display full HDFS exception message instead of None

Romain Rigaux 12 years ago
parent
commit
ba43e627c7
1 changed files with 5 additions and 2 deletions
  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)