diff options
author | David Robillard <d@drobilla.net> | 2018-09-22 10:42:46 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-22 10:42:46 +0200 |
commit | 6825835bb6e28a0f7c1c6ca5229104e173d91c80 (patch) | |
tree | 1a21e7dad1c21088fc0386499f520def75dbb06f /lv2specgen | |
parent | 50d838465b76d4e6d1edad42004f09940527f4dc (diff) | |
download | lv2-6825835bb6e28a0f7c1c6ca5229104e173d91c80.tar.xz |
Fix building documentation with Python 3.7
Diffstat (limited to 'lv2specgen')
-rwxr-xr-x | lv2specgen/lv2specgen.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py index 004e5bd..ff07128 100755 --- a/lv2specgen/lv2specgen.py +++ b/lv2specgen/lv2specgen.py @@ -1262,8 +1262,7 @@ def specgen(specloc, indir, style_uri, docdir, tags, opts, instances=False, root spec_ns = rdflib.Namespace(spec_ns_str) namespaces = getNamespaces(m) - keys = namespaces.keys() - keys.sort() + keys = sorted(namespaces.keys()) prefixes_html = "<span>" for i in keys: uri = namespaces[i] @@ -1289,8 +1288,8 @@ def specgen(specloc, indir, style_uri, docdir, tags, opts, instances=False, root instalist = None if instances: - instalist = getInstances(m, classlist, proplist) - instalist.sort(lambda x, y: cmp(getShortName(x).lower(), getShortName(y).lower())) + instalist = sorted(getInstances(m, classlist, proplist), + key=lambda x: getShortName(x).lower()) filelist = [] see_also_files = specProperties(m, spec, rdfs.seeAlso) @@ -1393,7 +1392,7 @@ def specgen(specloc, indir, style_uri, docdir, tags, opts, instances=False, root def save(path, text): try: f = open(path, "w") - f.write(text.encode("utf-8")) + f.write(text) f.flush() f.close() except Exception: |