diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-07-05 21:07:03 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-07-05 21:07:03 -0400 |
commit | 4cda83dedb5bf29cf34e9927def3fdb1dc35ee90 (patch) | |
tree | 6a2788620dfa8e8bff19d93cafed35ee423fbc62 /cmd2.py | |
parent | 394b20d40838253b73272c69db82bd50cfaef385 (diff) | |
download | cmd2-git-4cda83dedb5bf29cf34e9927def3fdb1dc35ee90.tar.gz |
Removed some extra newlines from error messages in do_load() and do__relative_load()
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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: |