summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-07-05 21:07:03 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-07-05 21:07:03 -0400
commit4cda83dedb5bf29cf34e9927def3fdb1dc35ee90 (patch)
tree6a2788620dfa8e8bff19d93cafed35ee423fbc62
parent394b20d40838253b73272c69db82bd50cfaef385 (diff)
downloadcmd2-git-4cda83dedb5bf29cf34e9927def3fdb1dc35ee90.tar.gz
Removed some extra newlines from error messages in do_load() and do__relative_load()
-rwxr-xr-xcmd2.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd2.py b/cmd2.py
index 59b2adbc..3fcfb4b7 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1608,7 +1608,7 @@ NOTE: This command is intended to only be used within text file scripts.
"""
# If arg is None or arg is an empty string this is an error
if not file_path:
- self.perror('_relative_load command requires a file path:\n', traceback_war=False)
+ self.perror('_relative_load command requires a file path:', traceback_war=False)
return
file_path = file_path.strip()
@@ -1627,24 +1627,24 @@ Script should contain one command per line, just like command would be typed in
"""
# If arg is None or arg is an empty string this is an error
if not file_path:
- self.perror('load command requires a file path:\n', traceback_war=False)
+ self.perror('load command requires a file path:', traceback_war=False)
return
expanded_path = os.path.abspath(os.path.expanduser(file_path.strip()))
# Make sure expanded_path points to a file
if not os.path.isfile(expanded_path):
- self.perror('{} does not exist or is not a file\n'.format(expanded_path), traceback_war=False)
+ self.perror('{} does not exist or is not a file'.format(expanded_path), traceback_war=False)
return
# Make sure the file is not empty
if os.path.getsize(expanded_path) == 0:
- self.perror('{} is empty\n'.format(expanded_path), traceback_war=False)
+ self.perror('{} is empty'.format(expanded_path), traceback_war=False)
return
# Make sure the file is ASCII or UTF-8 encoded text
if not self.is_text_file(expanded_path):
- self.perror('{} is not an ASCII or UTF-8 encoded text file\n'.format(expanded_path), traceback_war=False)
+ self.perror('{} is not an ASCII or UTF-8 encoded text file'.format(expanded_path), traceback_war=False)
return
try: