Merge branch 'nathan/import'

This commit is contained in:
Nathan Baker committed 2020-06-03 17:50:56 -07:00
commit 879c48a3d8
1 file changed
+1 -2
+1 -2
View File
@@ -13,8 +13,7 @@ def open_file_for_writing(input_file):
then will attempt to get file mode.
"""
try:
mode = input_file.mode
if not ("w" in mode or "a" in mode or "+" in mode):
if not input_file.writable():
raise IOError("File/stream not open for writing")
return input_file
except AttributeError: