summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-07 19:33:24 +0000
committerGerrit Code Review <review@openstack.org>2013-02-07 19:33:24 +0000
commit363e7aa554cb435ad12aa9182a78adb26a9cd2c7 (patch)
tree951db2ca9cd89c5bb1e05ba479b4cc2296be3fee /nova/api
parent6fb8b47d48d36c5ed3be899fb08536fc29dc9344 (diff)
parent77c30189abe53326d99241a465b702ad7eed6b03 (diff)
Merge "Fix inject_files for storing binary file."
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/servers.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index bf3f4cacc..723997eba 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -605,8 +605,7 @@ class Controller(wsgi.Controller):
except TypeError:
expl = _('Bad personality format')
raise exc.HTTPBadRequest(explanation=expl)
- contents = self._decode_base64(contents)
- if contents is None:
+ if self._decode_base64(contents) is None:
expl = _('Personality content for %s cannot be decoded') % path
raise exc.HTTPBadRequest(explanation=expl)
injected_files.append((path, contents))