ehazlett/shipyard — pull request #59 by nikdoof (2013-10-05 19:16:47+00:00)
Title: Support quoted environment variables

This change makes use of shlex to correctly parse the environment options and work around quoted values.

For example:

Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> "QUEUEBOT_USERNAME=bot1@bot.pleaseignore.com QUEUEBOT_PASSWORD=\"Lines are awesome!!\"".split()
['QUEUEBOT_USERNAME=bot1@bot.pleaseignore.com', 'QUEUEBOT_PASSWORD="Lines', 'are', 'awesome!!"']
>>> import shlex
>>> shlex.split("QUEUEBOT_USERNAME=bot1@bot.pleaseignore.com QUEUEBOT_PASSWORD=\"Lines are awesome!!\"")
['QUEUEBOT_USERNAME=bot1@bot.pleaseignore.com', 'QUEUEBOT_PASSWORD=Lines are awesome!!']
>>>