Bug 5171

Summary: missing else-statement in setCallback-function in snack.py
Product: [Retired] Red Hat Linux Reporter: mz
Component: newtAssignee: Matt Wilson <msw>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-09 06:51:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mz 1999-09-16 21:07:22 UTC
My guess (as snack.py is really bad documented):
class Widget:
  def setCallback(self, obj, data = None):
    if data:
      self.w.setCallback(obj, data)
    self.w.setCallback(obj)
should be:
class Widget:
  def setCallback(self, obj, data = None):
    if data:
      self.w.setCallback(obj, data)
    else:
      self.w.setCallback(obj)

Comment 1 Matt Wilson 2000-02-09 06:51:59 UTC
Good guess. :)

Fixed in next rawhide (newt >= 0.50.7-2)