summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-06 00:42:41 +0000
committerGerrit Code Review <review@openstack.org>2013-01-06 00:42:41 +0000
commitca91d3c607d82f57e736ef18be815023fd306342 (patch)
tree70682142d876569bc248a8aaf5b1f56f92cb74c5 /nova/tests
parent850e5d6bf989b15ca67396dc246e72f7de7524a8 (diff)
parent2ee83a493a91b6dd0ce79a8f6e74ac21638cff0a (diff)
Merge "improve libguestfs exception handling"
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/fakeguestfs.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/tests/fakeguestfs.py b/nova/tests/fakeguestfs.py
index c7ac01c64..33ca49c33 100644
--- a/nova/tests/fakeguestfs.py
+++ b/nova/tests/fakeguestfs.py
@@ -96,13 +96,13 @@ class GuestFS(object):
def stat(self, path):
if not path in self.files:
- raise Exception("No such file: " + path)
+ raise RuntimeError("No such file: " + path)
return self.files[path]["mode"]
def chown(self, uid, gid, path):
if not path in self.files:
- raise Exception("No such file: " + path)
+ raise RuntimeError("No such file: " + path)
if uid != -1:
self.files[path]["uid"] = uid
@@ -111,7 +111,7 @@ class GuestFS(object):
def chmod(self, mode, path):
if not path in self.files:
- raise Exception("No such file: " + path)
+ raise RuntimeError("No such file: " + path)
self.files[path]["mode"] = mode
@@ -123,7 +123,7 @@ class GuestFS(object):
def aug_get(self, cfgpath):
if not self.auginit:
- raise Exception("Augeus not initialized")
+ raise RuntimeError("Augeus not initialized")
if cfgpath == "/files/etc/passwd/root/uid":
return 0
@@ -137,4 +137,4 @@ class GuestFS(object):
return 500
elif cfgpath == "/files/etc/group/admins/gid":
return 600
- raise Exception("Unknown path %s", cfgpath)
+ raise RuntimeError("Unknown path %s", cfgpath)