John Chilton avatar John Chilton committed dd640a5

Fix for this:

[ERROR] ec2autorun:289 2013-02-08 06:28:43,071: Error running boot script '/tmp/cm/cm_boot.py'. Process returned code '1' and following stderr: Traceback (most recent call last):
File "/tmp/cm/cm_boot.py", line 577, in <module>
main()
File "/tmp/cm/cm_boot.py", line 541, in main
if not _virtualenv_exists():
File "/tmp/cm/cm_boot.py", line 410, in _virtualenv_exists
vb_path = os.path.join(os.environ['HOME'], '.venvburrito/startup.sh')
File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'HOME'

Not sure why this wasn't present, but it wasn't.

Comments (0)

Files changed (1)

     Check if virtual-burrito is installed and if a virtualenv named ``venv_name``
     exists. If so, return ``True``; ``False`` otherwise.
     """
-    vb_path = os.path.join(os.environ['HOME'], '.venvburrito/startup.sh')
+    vb_path = os.path.join(os.getenv('HOME', '/root'), '.venvburrito/startup.sh')
     if os.path.exists(vb_path):
         cm_venv = _run("/bin/bash -l -c '. {0}; lsvirtualenv | grep {1}'".format(vb_path, venv_name))
         if cm_venv and venv_name in cm_venv:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.