comparison wsgintegrate/factory.py @ 29:d742aff49859

-> python3
author Jeff Hammel <k0scist@gmail.com>
date Sun, 10 May 2020 18:46:40 -0700
parents caf763fc1c7d
children
comparison
equal deleted inserted replaced
28:b3a950065844 29:d742aff49859
16 16
17 # if the configuration has changed, 17 # if the configuration has changed,
18 # reload the .ini file 18 # reload the .ini file
19 mtime = os.path.getmtime(self.inifile) 19 mtime = os.path.getmtime(self.inifile)
20 if mtime > self.mtime: 20 if mtime > self.mtime:
21 print "Reloading '%s': %s > %s" % (self.inifile, mtime, self.mtime) 21 print("Reloading '%s': %s > %s" % (self.inifile, mtime, self.mtime))
22 try: 22 try:
23 config = self.read(self.inifile) 23 config = self.read(self.inifile)
24 self.configure(config) 24 self.configure(config)
25 except Exception, e: 25 except Exception as e:
26 print >> sys.stderr, "Error reading '%s': %s" % (self.inifile, e) 26 sys.stderr.write("Error reading '%s': %s\n" % (self.inifile, e))
27 self.mtime = mtime 27 self.mtime = mtime
28 28
29 app = self.load(self.main) 29 app = self.load(self.main)
30 return app(environ, start_response) 30 return app(environ, start_response)