From e8f3f55ff7c1d85430acdc2614081945fe3b61c3 Mon Sep 17 00:00:00 2001 From: Bryan Date: Wed, 25 Mar 2015 01:46:08 -0400 Subject: [PATCH] small fix to prevent strings for being literally quoted --- export_env_to_heroku.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/export_env_to_heroku.py b/export_env_to_heroku.py index 5048e63..7b68272 100644 --- a/export_env_to_heroku.py +++ b/export_env_to_heroku.py @@ -11,6 +11,10 @@ def export_env(filename='.env'): tmp = line.split('=') # further ignore whitespace padding that was around the = tmp = map(str.strip, tmp) + # Strip any quotes that might show up around the string + def striphyphen(somestring): + return somestring.strip("'").strip('"') + tmp = map(striphyphen, tmp) if len(tmp[0]) and tmp[0][0] == '#': # the heroku CLI cannot return if a variable is not yet set # or if it has been set to the empty string. -- 2.25.1