summaryrefslogtreecommitdiff
path: root/matweb/rest_api.py
diff options
context:
space:
mode:
authorjfriedli2022-01-24 19:43:12 +0000
committerjfriedli2022-01-24 19:43:12 +0000
commit71b00c20981eccf92ab7af0dc311543f077e327f (patch)
tree6094c2c110395743165853a4706bb0139be9c1b0 /matweb/rest_api.py
parent8689aa3c3144dbe6a7b67facd176cf0d7dbf8cc6 (diff)
Bugfix catch attribute errors and updated dependencies
Diffstat (limited to 'matweb/rest_api.py')
-rw-r--r--matweb/rest_api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/matweb/rest_api.py b/matweb/rest_api.py
index 49e7183..0c00331 100644
--- a/matweb/rest_api.py
+++ b/matweb/rest_api.py
@@ -69,7 +69,7 @@ class APIUpload(Resource):
69 _external=True 69 _external=True
70 ) 70 )
71 ), 201 71 ), 201
72 except ValueError: 72 except (ValueError, AttributeError):
73 current_app.logger.error('Upload - Invalid mime type') 73 current_app.logger.error('Upload - Invalid mime type')
74 abort(415, message='The filetype is not supported') 74 abort(415, message='The filetype is not supported')
75 except RuntimeError: 75 except RuntimeError:
@@ -119,7 +119,7 @@ class APIClean(Resource):
119 raise ValueError() 119 raise ValueError()
120 parser.remove_all() 120 parser.remove_all()
121 _, _, _, output_filename = utils.cleanup(parser, filepath, current_app.config['UPLOAD_FOLDER']) 121 _, _, _, output_filename = utils.cleanup(parser, filepath, current_app.config['UPLOAD_FOLDER'])
122 except ValueError: 122 except (ValueError, AttributeError):
123 current_app.logger.error('Upload - Invalid mime type') 123 current_app.logger.error('Upload - Invalid mime type')
124 abort(415, message='The filetype is not supported') 124 abort(415, message='The filetype is not supported')
125 except RuntimeError: 125 except RuntimeError: