Commits

Brent Tubbs committed 7f2f57b

added error handling for empty env var format

  • Participants
  • Parent commits ce75ae9

Comments (0)

Files changed (1)

File silk/fabfile.py

 def _format_supervisord_env(env_dict):
     """Takes a dictionary and returns a string in form
     'key=val,key2=val2'"""
-    return ','.join(['%s="%s"' % (key, env_dict[key]) for key in env_dict.keys()])
+    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.
+      #return empty string
+      return ''
 
 def write_config():
     print "WRITING CONFIG"