Commits

bren...@yougov.com  committed 4c65360

support full paths in static dir system_path

  • Participants
  • Parent commits e4d3c03

Comments (0)

Files changed (1)

File silk/fabfile.py

-from fabric.api import *
-from fabric.contrib.files import exists, upload_template
-import silk.lib
 import sys
 import os
 import datetime
 import pkg_resources
+import random
+import posixpath
+
 import yaml
-import random
+from fabric.api import *
+from fabric.contrib.files import exists, upload_template
+
+import silk.lib
 
 SRV_ROOT = '/srv'
 ROLLBACK_CAP = 3
     try:
       return ','.join(['%s="%s"' % (key, env_dict[key]) for key in env_dict.keys()])
     except AttributeError:
-      #env_dict isn't a dictionary, so they must not have incldued any env vars for us.
+      #env_dict isn't a dictionary, so they must not have included any env vars for us.
       #return empty string
       return ''
 
       for item in static_dirs:
           nginx_static += _get_nginx_static_snippet(
               item['url_path'],
-              '/'.join([env.remote_root, item['system_path']])
+              #system_path may be a full path, or relative to remote_root
+              posixpath.join([env.remote_root, item['system_path']])
           )
     template_vars = {
         'cmd': silk.lib.get_gunicorn_cmd(env.config, bin_dir='%s/bin' % (env.envdir)),