Added bzr to pip-requires and refixed some pep8 stuff
This commit is contained in:
parent
7bc9ed564c
commit
8f4078821d
@ -21,6 +21,7 @@ A few utility routines used throughout Glance
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
def image_meta_to_http_headers(image_meta):
|
def image_meta_to_http_headers(image_meta):
|
||||||
"""
|
"""
|
||||||
Returns a set of image metadata into a dict
|
Returns a set of image metadata into a dict
|
||||||
@ -85,6 +86,7 @@ def get_image_meta_from_headers(response):
|
|||||||
result['properties'] = properties
|
result['properties'] = properties
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def parse_mailmap(mailmap='.mailmap'):
|
def parse_mailmap(mailmap='.mailmap'):
|
||||||
mapping = {}
|
mapping = {}
|
||||||
if os.path.exists(mailmap):
|
if os.path.exists(mailmap):
|
||||||
@ -96,11 +98,13 @@ def parse_mailmap(mailmap='.mailmap'):
|
|||||||
mapping[alias] = canonical_email
|
mapping[alias] = canonical_email
|
||||||
return mapping
|
return mapping
|
||||||
|
|
||||||
|
|
||||||
def str_dict_replace(s, mapping):
|
def str_dict_replace(s, mapping):
|
||||||
for s1, s2 in mapping.iteritems():
|
for s1, s2 in mapping.iteritems():
|
||||||
s = s.replace(s1, s2)
|
s = s.replace(s1, s2)
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
def has_body(req):
|
def has_body(req):
|
||||||
"""
|
"""
|
||||||
Returns whether a Webob.Request object will possess an entity body.
|
Returns whether a Webob.Request object will possess an entity body.
|
||||||
|
@ -7,6 +7,7 @@ eventlet>=0.9.12
|
|||||||
lockfile==0.8
|
lockfile==0.8
|
||||||
python-daemon==1.5.5
|
python-daemon==1.5.5
|
||||||
python-gflags>=1.3
|
python-gflags>=1.3
|
||||||
|
bzr
|
||||||
routes
|
routes
|
||||||
webob
|
webob
|
||||||
wsgiref
|
wsgiref
|
||||||
|
Loading…
x
Reference in New Issue
Block a user