Bug 781220

Summary: mhsh exception when running "show selection"
Product: [Retired] Matahari Reporter: Russell Bryant <rbryant>
Component: matahariAssignee: Zane Bitter <zbitter>
Status: CLOSED WONTFIX QA Contact: Dave Johnson <dajohnso>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.6CC: astokes, matahari-maint, rbryant, whayutin, zbitter
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 12:30:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Russell Bryant 2012-01-13 01:46:03 UTC
Using "show selection" before selecting anything raises a Python exception:

$ mhsh
mhsh> show selection 
% 'NoneType' object is not iterable

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/matahari/shell/interpreter/interpreter.py", line 81, in onecmd
    return cmd.Cmd.onecmd(self, line)
  File "/usr/lib64/python2.7/cmd.py", line 219, in onecmd
    return func(arg)
  File "/usr/lib/python2.7/site-packages/matahari/shell/interpreter/command.py", line 191, in __call__
    return self.do(*args)
  File "/usr/lib/python2.7/site-packages/matahari/shell/mode.py", line 77, in show_selection
    self.writelist(self.state.objects)
  File "/usr/lib/python2.7/site-packages/matahari/shell/mode.py", line 49, in writelist
    self.write(*[str(o) for o in objects])
TypeError: 'NoneType' object is not iterable

Comment 1 Zane Bitter 2012-01-13 09:21:56 UTC
Already fixed upstream :)
https://github.com/matahari/matahari/commit/e709a65f07af195347193b43aacdd0539763dc97