comparison roundup/cgi/wsgi_handler.py @ 5378:35ea9b1efc14

Python 3 preparation: "raise" syntax. Changing "raise Exception, value" to "raise Exception(value)". Tool-assisted patch. Particular cases to check carefully are the one place in frontends/ZRoundup/ZRoundup.py where a string exception needed to be fixed, and the one in roundup/cgi/client.py involving raising an exception with a traceback (requires three-argument form of raise in Python 2, which as I understand it requires exec() to avoid a Python 3 syntax error).
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 21:39:58 +0000
parents 7aa72c31464d
children 277e91bf7936
comparison
equal deleted inserted replaced
5377:12fe83f90f0d 5378:35ea9b1efc14
77 self.__wfile = self.__start_response('%d %s'%(response_code, 77 self.__wfile = self.__start_response('%d %s'%(response_code,
78 message), headers) 78 message), headers)
79 79
80 def get_wfile(self): 80 def get_wfile(self):
81 if self.__wfile is None: 81 if self.__wfile is None:
82 raise ValueError, 'start_response() not called' 82 raise ValueError('start_response() not called')
83 return self.__wfile 83 return self.__wfile
84 84

Roundup Issue Tracker: http://roundup-tracker.org/