summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Waldon <bcwaldon@gmail.com>2012-06-11 09:57:00 -0700
committerBrian Waldon <bcwaldon@gmail.com>2012-06-11 09:57:03 -0700
commit7745b35b698df9cc08c681aa5a1d52d6346030cb (patch)
tree77ad8c41fe6b4cec0c4fcde0d95c7582d23dd7c4
parenteb9b17532fdf23d1969b5de888a8a3dae8bc1303 (diff)
downloadpython-novaclient-7745b35b698df9cc08c681aa5a1d52d6346030cb.tar.gz
Lock prettytable dep at v0.6
Specifically set the prettytable dependency so we can reliably align data in table cells. Change-Id: I1787c4100248b2a75405df690931110c76803413
-rw-r--r--novaclient/utils.py4
-rw-r--r--tools/pip-requires2
2 files changed, 3 insertions, 3 deletions
diff --git a/novaclient/utils.py b/novaclient/utils.py
index e477e3bc..a8e998a1 100644
--- a/novaclient/utils.py
+++ b/novaclient/utils.py
@@ -126,7 +126,7 @@ def pretty_choice_list(l):
def print_list(objs, fields, formatters={}):
mixed_case_fields = ['serverId']
pt = prettytable.PrettyTable([f for f in fields], caching=False)
- pt.aligns = ['l' for f in fields]
+ pt.align = 'l'
for o in objs:
row = []
@@ -147,7 +147,7 @@ def print_list(objs, fields, formatters={}):
def print_dict(d, property="Property"):
pt = prettytable.PrettyTable([property, 'Value'], caching=False)
- pt.aligns = ['l', 'l']
+ pt.align = 'l'
[pt.add_row(list(r)) for r in d.iteritems()]
print pt.get_string(sortby=property)
diff --git a/tools/pip-requires b/tools/pip-requires
index 32cdbc0b..a3fccff7 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -1,4 +1,4 @@
argparse
httplib2
-prettytable
+prettytable==0.6
simplejson