diff roundup/configuration.py @ 5383:6fbb7d52e38f

Python 3 preparation: use open() instead of file(). Tool-assisted patch. Note one case where a simple substitution did not suffice because the change was in a class that defined its own open() method earlier, and thus needed to use builtins.open (respectively __builtin__.open in Python 2).
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 22:10:24 +0000
parents 5a014410f254
children fc97f1f4a7e3
line wrap: on
line diff
--- a/roundup/configuration.py	Tue Jul 24 22:09:15 2018 +0000
+++ b/roundup/configuration.py	Tue Jul 24 22:10:24 2018 +0000
@@ -1437,7 +1437,7 @@
         _tmp_file = os.path.splitext(ini_file)[0]
         _bak_file = _tmp_file + ".bak"
         _tmp_file = _tmp_file + ".tmp"
-        _fp = file(_tmp_file, "wt")
+        _fp = open(_tmp_file, "wt")
         _fp.write("# %s configuration file\n" % self._get_name())
         _fp.write("# Autogenerated at %s\n" % time.asctime())
         need_set = self._get_unset_options()

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