##// END OF EJS Templates
py3: fix http_main changes for py3
marcink -
r983:eda01a0a python3
parent child Browse files
Show More
@@ -25,7 +25,7 b' import wsgiref.util'
25 import traceback
25 import traceback
26 import tempfile
26 import tempfile
27 from itertools import chain
27 from itertools import chain
28 from cStringIO import StringIO
28 from io import StringIO
29
29
30 import simplejson as json
30 import simplejson as json
31 import msgpack
31 import msgpack
@@ -89,7 +89,7 b' def _int_setting(settings, name, default'
89
89
90 def _bool_setting(settings, name, default):
90 def _bool_setting(settings, name, default):
91 input_val = settings.get(name, default)
91 input_val = settings.get(name, default)
92 if isinstance(input_val, unicode):
92 if isinstance(input_val, str):
93 input_val = input_val.encode('utf8')
93 input_val = input_val.encode('utf8')
94 settings[name] = asbool(input_val)
94 settings[name] = asbool(input_val)
95 return settings[name]
95 return settings[name]
@@ -209,7 +209,7 b' class VCSViewPredicate(object):'
209 self.remotes = val
209 self.remotes = val
210
210
211 def text(self):
211 def text(self):
212 return 'vcs view method = %s' % (self.remotes.keys(),)
212 return 'vcs view method = %s' % (list(self.remotes.keys()),)
213
213
214 phash = text
214 phash = text
215
215
@@ -497,7 +497,7 b' class HTTPApplication(object):'
497 except Exception:
497 except Exception:
498 log.exception('Failed to read .ini file for display')
498 log.exception('Failed to read .ini file for display')
499
499
500 environ = os.environ.items()
500 environ = list(os.environ.items())
501
501
502 resp = {
502 resp = {
503 'id': payload.get('id'),
503 'id': payload.get('id'),
General Comments 0
You need to be logged in to leave comments. Login now