summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorMark Washenberger <mark.washenberger@rackspace.com>2011-03-04 01:36:29 -0500
committerMark Washenberger <mark.washenberger@rackspace.com>2011-03-04 01:36:29 -0500
commitabd5779068f3b979fc79dec7a68549999c58092d (patch)
tree919bf0161de518812e568523fd1bab9d936a74d3 /nova/utils.py
parent5cb96217d4b057374ee15ec1d7f29fb8ea17cd12 (diff)
downloadnova-abd5779068f3b979fc79dec7a68549999c58092d.tar.gz
nova-abd5779068f3b979fc79dec7a68549999c58092d.tar.xz
nova-abd5779068f3b979fc79dec7a68549999c58092d.zip
remove ensure_b64_encoding
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 0cf91e0cc..02b71900c 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -491,18 +491,6 @@ def loads(s):
return json.loads(s)
-def ensure_b64_encoding(val):
- """Safety method to ensure that values expected to be base64-encoded
- actually are. If they are, the value is returned unchanged. Otherwise,
- the encoded value is returned.
- """
- try:
- dummy = base64.decode(val)
- return val
- except TypeError:
- return base64.b64encode(val)
-
-
def get_from_path(items, path):
""" Returns a list of items matching the specified path. Takes an
XPath-like expression e.g. prop1/prop2/prop3, and for each item in items,