summaryrefslogtreecommitdiff
path: root/cmd2/utils.py
diff options
context:
space:
mode:
authorkmvanbrunt <kmvanbrunt@gmail.com>2018-07-12 01:35:46 -0400
committerGitHub <noreply@github.com>2018-07-12 01:35:46 -0400
commit5d2133ae8e67435d1f2af17cd80d0490c0ba0f82 (patch)
treea82f2b99f497ee6cfab0edf789a1b5195e6bc99f /cmd2/utils.py
parentea7a4bbd14a41b0e9bdde8d34c666eb35df60c4a (diff)
parent4a233b8148add8b89847fbeab141ca15737e44f2 (diff)
downloadcmd2-git-5d2133ae8e67435d1f2af17cd80d0490c0ba0f82.tar.gz
Merge pull request #467 from python-cmd2/history
History clear
Diffstat (limited to 'cmd2/utils.py')
-rw-r--r--cmd2/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/utils.py b/cmd2/utils.py
index 1f08b416..d03e7f6f 100644
--- a/cmd2/utils.py
+++ b/cmd2/utils.py
@@ -127,7 +127,7 @@ def is_text_file(file_path: str) -> bool:
# noinspection PyUnusedLocal
if sum(1 for line in f) > 0:
valid_text_file = True
- except IOError: # pragma: no cover
+ except OSError: # pragma: no cover
pass
except UnicodeDecodeError:
# The file is not ASCII. Check if it is UTF-8.
@@ -137,7 +137,7 @@ def is_text_file(file_path: str) -> bool:
# noinspection PyUnusedLocal
if sum(1 for line in f) > 0:
valid_text_file = True
- except IOError: # pragma: no cover
+ except OSError: # pragma: no cover
pass
except UnicodeDecodeError:
# Not UTF-8