comparison test-svn.py @ 19:d4fc9341664e 1.20.2

Fixed an exception when tests.zip contained test cases in its root
author Oleg Oshmyan <chortos@inbox.lv>
date Sun, 13 Jun 2010 12:46:49 +0000
parents c0e925ae721e
children 5bfa23cd638d
comparison
equal deleted inserted replaced
18:a33653cdad57 19:d4fc9341664e
340 except KeyError: 340 except KeyError:
341 f.close() 341 f.close()
342 if os.path.isfile('tests.zip'): 342 if os.path.isfile('tests.zip'):
343 if not os.path.isabs(target): 343 if not os.path.isabs(target):
344 f = zipfile.ZipFile('tests.zip') 344 f = zipfile.ZipFile('tests.zip')
345 m = f.getinfo(name)
346 try: 345 try:
346 m = f.getinfo(name)
347 m.filename = target 347 m.filename = target
348 f.extract(m) 348 f.extract(m)
349 f.close() 349 f.close()
350 return True 350 return True
351 except KeyError: 351 except KeyError: