huit / nepho

A deployment tool for virtual data centers.
MIT License
12 stars 6 forks source link

Unsightly traceback from Vagrant provider errors #229

Closed hakamadare closed 10 years ago

hakamadare commented 10 years ago
$ nepho stack up
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
 Using default command scope nepho-cas vagrant-single-host
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
 - Downloading box ubuntu-server-12042-x64
Downloading box from URL: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box
Extracting box...te: 2504k/s, Estimated time remaining: 0:00:01)
The box you're attempting to add already exists:

Name: ubuntu-server-12042-x64
Provider: virtualbox
Traceback (most recent call last):
  File "/Users/huit/.virtualenvs/nepho/bin/nepho", line 9, in <module>
    load_entry_point('nepho==1.2.2', 'console_scripts', 'nepho')()
  File "/Users/huit/python/nepho/nepho/nepho/cli/bootstrap.py", line 29, in run
    app.run()
  File "/Users/huit/.virtualenvs/nepho/lib/python2.7/site-packages/cement-2.2.0-py2.7.egg/cement/core/foundation.py", line 520, in run
    self.controller._dispatch()
  File "/Users/huit/.virtualenvs/nepho/lib/python2.7/site-packages/cement-2.2.0-py2.7.egg/cement/core/controller.py", line 455, in _dispatch
    func()
  File "/Users/huit/.virtualenvs/nepho/lib/python2.7/site-packages/cement-2.2.0-py2.7.egg/cement/core/controller.py", line 461, in _dispatch
    func()
  File "/Users/huit/python/nepho/nepho/nepho/cli/stack.py", line 121, in create
    s.provider.deploy(self.app)
  File "/Users/huit/python/nepho/nepho/nepho/providers/vagrant_provider.py", line 84, in deploy
    execute('vagrant box add %s %s' % (name, url))
  File "/Users/huit/python/nepho/nepho/nepho/core/common.py", line 42, in execute
    raise subprocess.ProcessException(command, exitCode, output)
AttributeError: 'module' object has no attribute 'ProcessException'
robparrott commented 10 years ago

Looks like the subprocess.ProcessException() method does not exist. Need to raise an OSError instead.

robparrott commented 10 years ago

This ought to be fixed by the commit.