aboutsummaryrefslogtreecommitdiffstats
path: root/torturetest.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-15 05:15:06 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-15 05:15:06 +0000
commit7db31ad40528421524519a513c9b8ce8728635fb (patch)
treea419f625b83dc66870c37e4d0ae971b3d7c3ee25 /torturetest.py
parent8e28d02d7f41c1b964f36b7fc305b3a3f78a5652 (diff)
downloadfetchmail-7db31ad40528421524519a513c9b8ce8728635fb.tar.gz
fetchmail-7db31ad40528421524519a513c9b8ce8728635fb.tar.bz2
fetchmail-7db31ad40528421524519a513c9b8ce8728635fb.zip
Error handling improved.
svn path=/trunk/; revision=3101
Diffstat (limited to 'torturetest.py')
-rwxr-xr-xtorturetest.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/torturetest.py b/torturetest.py
index c65b2e27..a75f6ac0 100755
--- a/torturetest.py
+++ b/torturetest.py
@@ -30,8 +30,8 @@ class TestSite:
"Userid: %s\n" \
"Password: %s\n" \
"Protocol: %s\n" \
- "Options: '%s'\n" \
- "Capabilities: '%s'\n" \
+ "Options: %s\n" \
+ "Capabilities: %s\n" \
"Version: %s\n" \
"Comment: %s\n" \
% self.allattrs()
@@ -91,14 +91,20 @@ if __name__ == "__main__":
# Start by reading in the sitelist
ifp = open("testsites")
sitelist = []
+ linect = 0
while 1:
+ linect += 1
line = ifp.readline()
if not line:
break
elif line[0] in ("#", "\n"):
continue
else:
- sitelist.append(TestSite(line))
+ try:
+ sitelist.append(TestSite(line))
+ except:
+ print "Error on line %d" % linect
+ sys.exit(0)
(options, arguments) = getopt.getopt(sys.argv[1:], "dfp:tigv")
verbose = 0