Remove try / except and raise which masks a more specific exception.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/9bbf21c1 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/9bbf21c1 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/9bbf21c1 Branch: refs/heads/trunk Commit: 9bbf21c1284180e783eea4573ce188c29782bca5 Parents: 4bdf846 Author: Tomaz Muraus <[email protected]> Authored: Mon Oct 7 13:08:12 2013 +0200 Committer: Tomaz Muraus <[email protected]> Committed: Mon Oct 7 13:08:12 2013 +0200 ---------------------------------------------------------------------- libcloud/compute/drivers/nephoscale.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/9bbf21c1/libcloud/compute/drivers/nephoscale.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/nephoscale.py b/libcloud/compute/drivers/nephoscale.py index 5d532c2..dc100ce 100644 --- a/libcloud/compute/drivers/nephoscale.py +++ b/libcloud/compute/drivers/nephoscale.py @@ -357,15 +357,11 @@ get all keys call with no arguments') ... nowait=True, ... zone=location.id) """ - try: - hostname = kwargs.get('hostname', name) - service_type = size.id - image = image.id - connect_attempts = int(kwargs.get('connect_attempts', - CONNECT_ATTEMPTS)) - except Exception: - e = sys.exc_info()[1] - raise Exception("Error on create node: %s" % e) + hostname = kwargs.get('hostname', name) + service_type = size.id + image = image.id + connect_attempts = int(kwargs.get('connect_attempts', + CONNECT_ATTEMPTS)) data = {'name': name, 'hostname': hostname,
