aboutsummaryrefslogtreecommitdiffstats
path: root/subv.py
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2021-05-25 13:42:02 +0000
committers-ol <s+removethis@s-ol.nu>2021-05-25 13:42:02 +0000
commit12ca589a55376687c13d2298392ca5ddb344a219 (patch)
treed53f03557db0072eeeb8c0433fbe5444be4510e7 /subv.py
parentuse new bits in format.py (diff)
downloadsubv-12ca589a55376687c13d2298392ca5ddb344a219.tar.gz
subv-12ca589a55376687c13d2298392ca5ddb344a219.zip
update all stages to work
Diffstat (limited to 'subv.py')
-rw-r--r--subv.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/subv.py b/subv.py
index ed30308..c8e6048 100644
--- a/subv.py
+++ b/subv.py
@@ -368,11 +368,12 @@ class LineIterator(object):
return (self.segment, self.line)
def exception(self, msg):
+ stream_name = getattr(self.stream, 'name', '(unnamed)')
if self.line:
- msg = msg + "\n{}:{}: {}".format(self.stream.name, self.i, format(self.line))
+ msg = msg + "\n{}:{}: {}".format(stream_name, self.i, format(self.line))
msg = msg + "\nparsed as {}".format(dump(self.line))
elif self.raw_line:
- msg = msg + "\n{}:{}: {}".format(self.stream.name, self.i, self.raw_line.strip())
+ msg = msg + "\n{}:{}: {}".format(stream_name, self.i, self.raw_line.strip())
return SubVException(msg)
def with_parsed_lines(process_fn):