Mercurial > p > roundup > code
diff test/test_xmlrpc.py @ 5385:e9fb7c539a52
Python 3 preparation: use exec(compile(open().read())) instead of execfile().
Tool-assisted patch.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Tue, 24 Jul 2018 22:18:30 +0000 |
| parents | 64b05e24dbd8 |
| children | d26921b851c3 |
line wrap: on
line diff
--- a/test/test_xmlrpc.py Tue Jul 24 22:11:16 2018 +0000 +++ b/test/test_xmlrpc.py Tue Jul 24 22:18:30 2018 +0000 @@ -52,7 +52,10 @@ thisdir = os.path.dirname(__file__) vars = {} - execfile(os.path.join(thisdir, "tx_Source_detector.py"), vars) + exec(compile(open(os.path.join(thisdir, + "tx_Source_detector.py")).read(), + os.path.join(thisdir, "tx_Source_detector.py"), 'exec'), + vars) vars['init'](self.db) self.server = RoundupInstance(self.db, self.instance.actions, None)
