diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-11-28 19:28:45 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-11-28 19:28:45 +0000 |
| commit | bdb1ff73d2f24ba43102143c1ac670fdc0739528 (patch) | |
| tree | 47b121a6d7d6974b832f36f79cbdc6e058acd9df /bin/stack | |
| parent | 5b17af3a4d76064034d8d4a6e9c5cd06c3ceb1ad (diff) | |
| parent | 2f70137a1b4951be56ebeb25a186e53551306faa (diff) | |
Merge "Bug #897054: stack crashes with AttributeError on e.reason if the server returns an error"
Diffstat (limited to 'bin/stack')
| -rwxr-xr-x | bin/stack | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -118,12 +118,12 @@ def do_request(controller, method, params=None): req = urllib2.Request(url, data, headers) try: resp = urllib2.urlopen(req) - except urllib2.URLError, e: - print 'Failed to connect to %s: %s' % (url, e.reason) - sys.exit(1) except urllib2.HTTPError, e: print e.read() sys.exit(1) + except urllib2.URLError, e: + print 'Failed to connect to %s: %s' % (url, e.reason) + sys.exit(1) return json.loads(resp.read()) |
