[27539] in Source-Commits
python-discuss commit: Include malformed line in ValueError args
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Mon Dec 9 14:22:13 2013
Date: Mon, 9 Dec 2013 14:22:06 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201312091922.rB9JM6qc013900@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/python-discuss/commit/a76097a201544f53238617d799811ac97e3e337a
commit a76097a201544f53238617d799811ac97e3e337a
Author: Jonathan Reed <jdreed@mit.edu>
Date: Thu Nov 21 14:18:28 2013 -0500
Include malformed line in ValueError args
Actually tell the caller which entry we're unhappy about.
discuss/rcfile.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/discuss/rcfile.py b/discuss/rcfile.py
index 978dd7a..c633692 100644
--- a/discuss/rcfile.py
+++ b/discuss/rcfile.py
@@ -62,7 +62,7 @@ class RCFile:
for line in rcfile:
match = re.match(r"^(\d):(\d+):(\d+):([a-zA-Z\d.\-]+):([^:]+):([^:]+):$", line.strip())
if not match:
- raise ValueError("Malformed .meetings file entry")
+ raise ValueError("Malformed .meetings file entry: '%s'" % (line.strip(),))
status = int(match.group(1))
entry = {
'changed' : bool(status & 0x01),