2
0
Fork 0

[tests] Use older syntax for exception handling

personal/stbuehler/wip
Stefan Bühler 2010-10-05 23:02:44 +02:00
parent 67fcc00125
commit 8748c1c289
1 changed files with 3 additions and 3 deletions

View File

@ -145,7 +145,7 @@ var.vhosts = var.vhosts + [ "%s" : ${
print >> Env.log, "Test %s failed" % (self.name)
else:
print >> sys.stderr, "Test %s failed" % (self.name)
except Exception as e:
except Exception, e:
failed = True
if self.todo:
print >> Env.log, "Test %s failed:" % (self.name)
@ -467,7 +467,7 @@ allow-listen {{ ip "127.0.0.1:{Env.port}"; }}
if self.prepared_files.has_key(fname):
try:
os.remove(os.path.join(Env.dir, fname))
except Exception as e:
except Exception, e:
print >>sys.stderr, "Couldn't delete file '%s': %s" % (fname, e)
return False
return True
@ -486,7 +486,7 @@ allow-listen {{ ip "127.0.0.1:{Env.port}"; }}
if 0 == self.prepared_dirs[dirname]:
try:
os.rmdir(os.path.join(Env.dir, dirname))
except Exception as e:
except Exception, e:
print >>sys.stderr, "Couldn't delete directory '%s': %s" % (dirname, e)
def PrepareFile(self, fname, content):