summaryrefslogtreecommitdiff
path: root/obnamlib/structurederror.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-12-28 20:53:21 +0200
committerLars Wirzenius <liw@liw.fi>2014-12-28 20:53:21 +0200
commitc4d4310d801ccf20ea73717eb05ea27d4c6fbc62 (patch)
treee9935ae2c5b6690359dffc6b0989503ed6354516 /obnamlib/structurederror.py
parent4b82cdec0cceb61abb6d1c933212e35b38f26e29 (diff)
downloadobnam-c4d4310d801ccf20ea73717eb05ea27d4c6fbc62.tar.gz
Remove trailing whitespace
Diffstat (limited to 'obnamlib/structurederror.py')
-rw-r--r--obnamlib/structurederror.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/obnamlib/structurederror.py b/obnamlib/structurederror.py
index 81c4d5a4..18c13e5a 100644
--- a/obnamlib/structurederror.py
+++ b/obnamlib/structurederror.py
@@ -123,10 +123,17 @@ class StructuredError(Exception):
formatted_msg = '{0} (PROGRAMMING ERROR: {1} {2})'.format(
dedented, repr(e), repr(self.kwargs))
- return '{0}: {1}'.format(self.id, formatted_msg)
+ formatted = '{0}: {1}'.format(self.id, formatted_msg)
+ return formatted.rstrip()
def formatted(self):
- '''Return the full formatted message.'''
+ '''Return the full formatted message.
+
+ Note that the returned string will NOT end in whitespace. If
+ the format string ends in, say, a newline, it is stripped
+ away.
+
+ '''
return self._format_msg(self.msg)
def __str__(self):