From 8f4078821dd6902a4312c1d8008949dae0197f62 Mon Sep 17 00:00:00 2001 From: Cerberus Date: Tue, 25 Jan 2011 00:17:38 -0600 Subject: [PATCH] Added bzr to pip-requires and refixed some pep8 stuff --- glance/util.py | 4 ++++ tools/pip-requires | 1 + 2 files changed, 5 insertions(+) diff --git a/glance/util.py b/glance/util.py index a372cd8745..4d24298bc6 100644 --- a/glance/util.py +++ b/glance/util.py @@ -21,6 +21,7 @@ A few utility routines used throughout Glance import os + def image_meta_to_http_headers(image_meta): """ Returns a set of image metadata into a dict @@ -85,6 +86,7 @@ def get_image_meta_from_headers(response): result['properties'] = properties return result + def parse_mailmap(mailmap='.mailmap'): mapping = {} if os.path.exists(mailmap): @@ -96,11 +98,13 @@ def parse_mailmap(mailmap='.mailmap'): mapping[alias] = canonical_email return mapping + def str_dict_replace(s, mapping): for s1, s2 in mapping.iteritems(): s = s.replace(s1, s2) return s + def has_body(req): """ Returns whether a Webob.Request object will possess an entity body. diff --git a/tools/pip-requires b/tools/pip-requires index a9cecabbac..9e6dac05d8 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -7,6 +7,7 @@ eventlet>=0.9.12 lockfile==0.8 python-daemon==1.5.5 python-gflags>=1.3 +bzr routes webob wsgiref