Skip to content

Commit d743f92

Browse files
committed
Updated to new prettytable api. Fixes bug 995818
In 0.6, printt() (wrapper to get_string) has been removed. Updated to use get_string(), backward available since 0.2 release. Change-Id: Ica292757ec3de5004f27afbc5c8ee11d839421df
1 parent 997a472 commit d743f92

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Jesse Andrews <anotherjesse@gmail.com>
3434
Johannes Erdfelt <johannes.erdfelt@rackspace.com>
3535
John Garbutt <john.garbutt@citrix.com>
3636
Josh Kearney <josh@jk0.org>
37+
Juan G. Hernando Rivero <ghe.rivero@stackops.com>
3738
Kevin L. Mitchell <kevin.mitchell@rackspace.com>
3839
Kiall Mac Innes <kiall@managedit.ie>
3940
Kirill Shileev <kshileev@griddynamics.com>

novaclient/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ def print_list(objs, fields, formatters={}):
142142
row.append(data)
143143
pt.add_row(row)
144144

145-
pt.printt(sortby=fields[0])
145+
print pt.get_string(sortby=fields[0])
146146

147147

148148
def print_dict(d, property="Property"):
149149
pt = prettytable.PrettyTable([property, 'Value'], caching=False)
150150
pt.aligns = ['l', 'l']
151151
[pt.add_row(list(r)) for r in d.iteritems()]
152-
pt.printt(sortby=property)
152+
print pt.get_string(sortby=property)
153153

154154

155155
def find_resource(manager, name_or_id):

0 commit comments

Comments
 (0)