Skip to content

Commit

Permalink
libcoveweb2/utils.py: get_file_type_for_flatten_tool: include an erro…
Browse files Browse the repository at this point in the history
…r message in raise at end

#3
  • Loading branch information
odscjames committed Jul 19, 2023
1 parent 82f96f8 commit 5dbbc89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## Fixed

- utils.py: get_file_type_for_flatten_tool: include an error message in raise at end https://github.com/OpenDataServices/lib-cove-web-2/issues/3

## [0.2.0] - 2023-07-11

## Added
Expand Down
9 changes: 8 additions & 1 deletion libcoveweb2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,11 @@ def get_file_type_for_flatten_tool(supplied_data_file: SuppliedDataFile):
except FileNotFoundError:
pass
# All right, we give up.
raise
raise Exception(
"Could not get file type for file "
+ str(supplied_data_file.id)
+ " with file name "
+ str(supplied_data_file.filename)
+ " and content type "
+ str(supplied_data_file.content_type)
)

0 comments on commit 5dbbc89

Please sign in to comment.