Commits

Brent Tubbs  committed 184735e

more fixes for CDN deployment

  • Participants
  • Parent commits 3bd2046

Comments (0)

Files changed (3)

 setup(
     name='silk-deployment',
     author='Brent Tubbs',
-    version='0.0.6',
+    version='0.0.7',
 	packages=find_packages(),
     package_dir={'silk': 'silk'},
     include_package_data=True,

File silk/fabfile.py

 def write_config():
     print "WRITING CONFIG"
     nginx_static = ''
-    for item in env.config['static_dirs']:
-        nginx_static += _get_nginx_static_snippet(
-            item['url_path'],
-            os.path.join(env.site_root, item['system_path'])
-        )
+    static_dirs = env.config.get('static_dirs', None)
+    if static_dirs:
+      for item in static_dirs:
+          nginx_static += _get_nginx_static_snippet(
+              item['url_path'],
+              os.path.join(env.site_root, item['system_path'])
+          )
     template_vars = {
         'cmd': silk.lib.get_gunicorn_cmd(env.config, bin_dir='%s/bin' % (env.envdir)),
         'nginx_static': nginx_static,
     Falls back to just site.yaml if no role given and no blame file found"""
     if role is None:
         try:
-            return get_blame(site_root)['config']
+            return get_blame(site_root)[1]['config']
         except IOError:
             return get_site_config(site_root)
     else: