~soren/vmbuilder/vmbuilder.refactoring

« back to all changes in this revision

Viewing changes to VMBuilder/plugins/virtualbox/__init__.py

  • Committer: Soren Hansen
  • Date: 2009-12-03 11:34:24 UTC
  • Revision ID: soren@ubuntu.com-20091203113424-sqb2p1518k2oxw75
Development snapshot of the refactoring work, I'm doing. Feel free to look around now, but I'll finish this up and divide it into digestible chunks and submit it in a day or so.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
18
#
19
19
import vm
 
20
 
 
21
def vbox_manager_path():
 
22
    exe = 'VBoxManage'
 
23
    for dir in os.environ['PATH'].split(os.path.pathsep):
 
24
        path = '%s%s%s' % (dir, os.path.sep, exe)
 
25
        if os.access(path, os.X_OK):
 
26
            return path
 
27