changeset 6794:24c9b2692ae4

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.
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 12 Aug 2017 17:30:33 +0200
parents 240d54a3091e
children 1ae6e0aa87c5
files kallithea/lib/paster_commands/install_iis.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/paster_commands/install_iis.py	Sat Aug 12 17:29:58 2017 +0200
+++ b/kallithea/lib/paster_commands/install_iis.py	Sat Aug 12 17:30:33 2017 +0200
@@ -75,10 +75,11 @@
 
         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 '