Commits

Mikhail Korobov committed 22a0b4c

small cleanup

Comments (0)

Files changed (2)

fab_deploy/webserver/apache.py

 __all__ = ['Apache']
 
 APACHE_PORTS_FILE = '/etc/apache2/ports.conf'
-APACHE_FIRST_PORT = 50000 # see http://www.iana.org/assignments/port-numbers
-APACHE_LAST_PORT = 60000
 TAKEOVER_STRING = '# This file is managed by django-fab-deploy. "Listen" directives are in /etc/apache2/sites-available/*'
 OLD_TAKEOVER_STRING = '# This file is managed by django-fab-deploy. Please do not edit it manually.'
 
 class Apache(WsgiBackend):
-    
+
     def __init__(self, config='apache.conf', wsgi='wsgi.py'):
         super(Apache, self).__init__(wsgi)
         self.config = config
         return output.succeeded
 
     # ==== installation ===
-    
+
     @task_method
     @utils.run_as_sudo
     def install(self, confirm=True):
             '/etc/apache2/sites-enabled/default',
             '/etc/apache2/sites-enabled/000-default',
         ]
-    
+
         for site in default_sites:
             if files.exists(site, use_sudo=True):
                 msg = "Remote %s will be deleted.\n" \
                     sudo('rm -f %s' % site)
                 else:
                     abort("Aborting.")
-    
-    
+
+
         if _ports_conf_needs_disabling():
             msg = "The contents of remote %s will be erased.\n"\
                   "This is necessary for django-fab-deploy to work.\n" \

fab_deploy/webserver/wsgi_backend.py

 
     def get_wsgi_file_name(self):
         return self.wsgi
-    
+
     def get_wsgi_dir(self):
         return posixpath.join(
             env.conf['ENV_DIR'],
-            'var/wsgi/',
+            'var', 'wsgi',
             env.conf['INSTANCE_NAME']
         )
 
     def touch(self, wsgi_file=None):
         """
         Reloads source code by touching the wsgi file.
-        
+
         If backend doesn't have this feature then this method must be
         overriden to provide same effect in other way (restart, reload, etc).
         """
         wsgi_dir = self.get_wsgi_dir()
         run('mkdir -p ' + wsgi_dir)
         utils.upload_config_template(
-            self.wsgi, 
+            self.wsgi,
             posixpath.join(wsgi_dir, self.get_wsgi_file_name())
         )