diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-11-11 23:01:35 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-11-11 23:01:35 +0000 |
| commit | 4fcd68b4583779232a9f9e9964fde03d655d990f (patch) | |
| tree | 1f3503b2ec2e43db4b9b3b3ad71dd64847131a43 | |
| parent | 440ae80a1e6e098bd01134830094e0c5b198131a (diff) | |
| parent | 3757ba9ccf0915d1854c97f625effd0edbedfa12 (diff) | |
| download | nova-4fcd68b4583779232a9f9e9964fde03d655d990f.tar.gz nova-4fcd68b4583779232a9f9e9964fde03d655d990f.tar.xz nova-4fcd68b4583779232a9f9e9964fde03d655d990f.zip | |
Merge "Fixes a bug in api.metadata.base.lookup() on Windows"
| -rw-r--r-- | nova/api/metadata/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/api/metadata/base.py b/nova/api/metadata/base.py index 469d87d46..6fd8b1374 100644 --- a/nova/api/metadata/base.py +++ b/nova/api/metadata/base.py @@ -21,6 +21,7 @@ import base64 import json import os +import posixpath from nova.api.ec2 import ec2utils from nova import block_device @@ -314,9 +315,9 @@ class InstanceMetadata(): def lookup(self, path): if path == "" or path[0] != "/": - path = os.path.normpath("/" + path) + path = posixpath.normpath("/" + path) else: - path = os.path.normpath(path) + path = posixpath.normpath(path) # fix up requests, prepending /ec2 to anything that does not match path_tokens = path.split('/')[1:] |
