Mercurial > code > home > repos > light9
diff bin/homepageConfig @ 1859:f066d6e874db
2to3 with these fixers: all idioms set_literal
Ignore-this: cbd28518218c2f0ddce8c4f92d3b8b33
author | drewp@bigasterisk.com |
---|---|
date | Wed, 22 May 2019 00:08:22 +0000 |
parents | 7772cc48e016 |
children | 3c523c71da29 |
line wrap: on
line diff
--- a/bin/homepageConfig Tue May 21 23:56:12 2019 +0000 +++ b/bin/homepageConfig Wed May 22 00:08:22 2019 +0000 @@ -3,8 +3,8 @@ from rdflib import RDF, URIRef from light9 import networking, showconfig from light9.namespaces import L9 -from urlparse import urlparse -from urllib import splitport +from urllib.parse import urlparse +from urllib.parse import splitport from rdfdb.syncedgraph import SyncedGraph from twisted.internet import reactor @@ -15,11 +15,11 @@ webServer = graph.value(netHome, L9['webServer']) if not webServer: raise ValueError('no %r :webServer' % netHome) -print "listen %s;" % splitport(urlparse(webServer).netloc)[1] +print("listen %s;" % splitport(urlparse(webServer).netloc)[1]) def location(path, server): - print """ + print(""" location /%(path)s/ { # for websocket @@ -31,7 +31,7 @@ proxy_pass %(server)s; proxy_buffering off; rewrite /[^/]+/(.*) /$1 break; - }""" % vars() + }""" % vars()) for role, server in sorted(graph.predicate_objects(netHome)): @@ -44,10 +44,10 @@ location(path, server) showPath = showconfig.showUri().split('/', 3)[-1] -print """ +print(""" location /%(path)s { root %(root)s; }""" % { 'path': showPath, 'root': showconfig.root()[:-len(showPath)] -} +})