llvm.org GIT mirror lnt / f3d3f25
[LNT] Python 3 support: Minor automatic 2to3 fixups Summary: Automatic fixups done using `2to3`: - `2to3 -f numliterals` - `2to3 -f dict` - `2to3 -f map` - `2to3 -f exec` The `exec` call is additionally updated to have a string argument as noted by @thopre. The changes cover the files found to be affected when running tests (without result submission). Reviewers: cmatthews, thopre, kristof.beyls Reviewed By: cmatthews Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D67534 git-svn-id: https://llvm.org/svn/llvm-project/lnt/trunk@371896 91177308-0d34-0410-b5e6-96231b3b80d8 Hubert Tong a month ago
4 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1111
1212 formats = [plist, json]
1313 formats_by_name = dict((f['name'], f) for f in formats)
14 format_names = formats_by_name.keys()
14 format_names = list(formats_by_name.keys())
1515
1616
1717 def get_format(name):
159159 wsgi_file = open(wsgi_path, 'w')
160160 wsgi_file.write(kWSGITemplate % locals())
161161 wsgi_file.close()
162 os.chmod(wsgi_path, 0755)
162 os.chmod(wsgi_path, 0o755)
163163
164164 # Execute an upgrade on the database to initialize the schema.
165165 lnt.server.db.migrate.update_path(db_path)
5353 raise Exception("Invalid config: %r" % config_path)
5454
5555 config_data = {}
56 exec open(config_path) in config_data
56 exec(open(config_path).read(), config_data)
5757 config = lnt.server.config.Config.from_data(config_path, config_data)
5858
5959 return Instance(config_path, config, tmpdir)
181181 self.name = str(name)
182182 self.info = dict((str(key), str(value))
183183 for key, value in info.items())
184 self.data = map(conv_f, data)
184 self.data = list(map(conv_f, data))
185185
186186 def render(self):
187187 """Return info from this instance in a dictionary that respects