Przeglądaj źródła

[filebrowser] Truncate the error message returned by the HDFSfileuploader

Jenny Kim 10 lat temu
rodzic
commit
a2e4eb1e93
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      apps/filebrowser/src/filebrowser/views.py

+ 1 - 1
apps/filebrowser/src/filebrowser/views.py

@@ -1127,7 +1127,7 @@ def upload_file(request):
             resp = _upload_file(request)
             response.update(resp)
         except Exception, ex:
-            response['data'] = str(ex)
+            response['data'] = str(ex).split('\n', 1)[0]
             hdfs_file = request.FILES.get('hdfs_file')
             if hdfs_file:
                 hdfs_file.remove()