comparison test/test_locking.py @ 5378:35ea9b1efc14

Python 3 preparation: "raise" syntax. Changing "raise Exception, value" to "raise Exception(value)". Tool-assisted patch. Particular cases to check carefully are the one place in frontends/ZRoundup/ZRoundup.py where a string exception needed to be fixed, and the one in roundup/cgi/client.py involving raising an exception with a traceback (requires three-argument form of raise in Python 2, which as I understand it requires exec() to avoid a Python 3 syntax error).
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 21:39:58 +0000
parents 364c54991861
children fed0f839c260
comparison
equal deleted inserted replaced
5377:12fe83f90f0d 5378:35ea9b1efc14
34 try: 34 try:
35 acquire_lock(self.path, block=0) 35 acquire_lock(self.path, block=0)
36 except: 36 except:
37 pass 37 pass
38 else: 38 else:
39 raise AssertionError, 'no exception' 39 raise AssertionError('no exception')
40 release_lock(f) 40 release_lock(f)
41 f = acquire_lock(self.path) 41 f = acquire_lock(self.path)
42 release_lock(f) 42 release_lock(f)
43 43
44 def tearDown(self): 44 def tearDown(self):

Roundup Issue Tracker: http://roundup-tracker.org/