Changeset - 24c9b2692ae4
[Not reviewed]
default
0 1 0
Mads Kiilerich - 8 years ago 2017-08-12 17:30:33
mads@kiilerich.com
install-iis: fix failure - replace paster ensure_file with explicit file writing

ensure_file was a paster thing, not present in gearbox, and install-iis would
thus fail.

With this, install-iis has been tested to no longer crash.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/paster_commands/install_iis.py
Show inline comments
 
@@ -72,16 +72,17 @@ class Command(BasePasterCommand):
 
            import isapi_wsgi
 
        except ImportError:
 
            self.error('missing requirement: isapi-wsgi not installed')
 

	
 
        dispatchfile = os.path.join(os.getcwd(), 'dispatch.py')
 
        print 'Writing %s' % dispatchfile
 
        self.ensure_file(dispatchfile, dispath_py_template % {
 
        with file(dispatchfile, 'w') as f:
 
            f.write(dispath_py_template % {
 
                'inifile': config_file.replace('\\', '\\\\'),
 
                'virtualdir': args.virtualdir,
 
                }, False)
 
                })
 

	
 
        print ('Run \'python "%s" install\' with administrative privileges '
 
            'to generate the _dispatch.dll file and install it into the '
 
            'default web site') % (dispatchfile,)
 

	
 
    def get_parser(self, prog_name):
0 comments (0 inline, 0 general)