summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-08-08 22:02:47 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-08-08 22:02:47 -0400
commitc4d7833dd3fb170fb95fa17e4e0336235e4e0ba3 (patch)
treee3ac8f803c333bf60980d557a7e8be59666e8d22 /cmd2/cmd2.py
parente1cde42b9f60e85233909a2648df28124c7f12e7 (diff)
downloadcmd2-git-c4d7833dd3fb170fb95fa17e4e0336235e4e0ba3.tar.gz
No longer treating empty text scripts as an error condition
Diffstat (limited to 'cmd2/cmd2.py')
-rwxr-xr-xcmd2/cmd2.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index a0df0b00..9d29418b 100755
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3790,9 +3790,8 @@ class Cmd(cmd.Cmd):
self.perror("'{}' is not a file".format(expanded_path))
return
- # Make sure the file is not empty
+ # An empty file is not an error, so just return
if os.path.getsize(expanded_path) == 0:
- self.perror("'{}' is empty".format(expanded_path))
return
# Make sure the file is ASCII or UTF-8 encoded text