projects
/
pgwui_bulk_upload
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f296c95
)
Always close the file after getting column headers
author
Karl O. Pinc
<kop@karlpinc.com>
Tue, 19 Jan 2021 17:44:04 +0000
(11:44 -0600)
committer
Karl O. Pinc
<kop@karlpinc.com>
Tue, 19 Jan 2021 17:44:04 +0000
(11:44 -0600)
src/pgwui_bulk_upload/views/bulk_upload.py
patch
|
blob
|
history
diff --git
a/src/pgwui_bulk_upload/views/bulk_upload.py
b/src/pgwui_bulk_upload/views/bulk_upload.py
index 9d0c9bf6110b3255bcf587a580c7fa87edc18a22..b540297e2b3a2c21e834654157fcabd1acfae528 100644
(file)
--- a/
src/pgwui_bulk_upload/views/bulk_upload.py
+++ b/
src/pgwui_bulk_upload/views/bulk_upload.py
@@
-553,9
+553,10
@@
class BulkTableUploadHandler(BaseTableUploadHandler):
map_description(fileinfo.filepath, fileinfo.relation),
fileinfo.filepath, fileinfo.relation)
errors.append(exp)
- # Limit number of open files, close the file handle until it
- # is time to read the file
- fileinfo.close_fileo()
+ finally:
+ # Limit number of open files, close the file handle until it
+ # is time to read the file
+ fileinfo.close_fileo()
if errors:
raise core_ex.MultiError(errors)