Bug #3365

snf-manage server-list barfs with --filterby

Added by Vangelis Koukis over 10 years ago. Updated over 9 years ago.

Status:Closed Start date:03/04/2013
Priority:High Due date:03/05/2013
Assignee:Christos Stavrakakis % Done:


Category:Admin Spent time: -
Target version:0.13.0


To reproduce:

root@worker1:~# snf-manage server-list --filter-by="userid=vkoukis@grnet.gr" 
Traceback (most recent call last):
  File "/usr/bin/snf-manage", line 9, in <module>
    load_entry_point('snf-webproject==0.13rc6', 'console_scripts', 'snf-manage')()
  File "/usr/lib/python2.6/dist-packages/synnefo/webproject/manage.py", line 344, in main
  File "/usr/lib/python2.6/dist-packages/synnefo/webproject/manage.py", line 274, in execute
  File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.6/dist-packages/synnefo/api/management/commands/server-list.py", line 145, in handle
    pprint_table(self.stdout, table, headers, separator)
  File "/usr/lib/python2.6/dist-packages/synnefo/management/common.py", line 232, in pprint_table
    widths = [max(map(len, col)) for col in zip(*table)]
TypeError: object of type 'NoneType' has no len()

Associated revisions

Revision db4873f8
Added by Christos Stavrakakis over 10 years ago

Fix TypeError in pprint_table

Convert all fields of table and headers to strings before counting their
length or right-aligning them.

Refs #3365

Revision 7d36f85e
Added by Christos Stavrakakis over 10 years ago

Add type assertions in pprint_table args

Add assertions about the types of "table" and "headers" arguments.

Refs #3365


#1 Updated by Christos Stavrakakis over 10 years ago

  • Due date set to 03/05/2013
  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

Although I can't reproduce this bug, I believe that the associated commits will solve the TypeError.

#2 Updated by Christos Stavrakakis over 9 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF