Skip to content

Commit

Permalink
Merge pull request #130 from joshmoore/omero-install
Browse files Browse the repository at this point in the history
config_parser: further futurize
  • Loading branch information
joshmoore committed Nov 29, 2019
2 parents 201b37f + ae3b9c3 commit 645fb31
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/omero/install/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def parse_module(self, module='omeroweb.settings'):
from django.conf import settings

for key, values in sorted(
iter(settings.CUSTOM_SETTINGS_MAPPINGS.items()),
iter(list(settings.CUSTOM_SETTINGS_MAPPINGS.items())),
key=lambda k: k):

p = Property()
Expand Down Expand Up @@ -372,8 +372,8 @@ def headers(self):
additional_headers[section] = Header(section)
headers.setdefault(additional_headers[section], []).append(x)

for key in headers.keys():
headers[key].sort(lambda a, b: cmp(a.key, b.key))
for key in list(headers.keys()):
headers[key].sort(key=lambda x: x.key)
return headers

def print_defaults(self):
Expand Down Expand Up @@ -412,6 +412,8 @@ def print_rst(self):
properties += "%s\n" % underline(len(p.key))
for line in p.txt.split("\n"):
if line:
if isbytes(line):
line = bytes_to_native_str(line)
properties += "%s\n" % (line)
else:
properties += "\n"
Expand Down

0 comments on commit 645fb31

Please sign in to comment.