Bug 248878 - snack.py:EntryWindow incompatible with older versions
snack.py:EntryWindow incompatible with older versions
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: newt (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-19 08:19 EDT by Benjamin Schweizer
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 0.52.7-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-17 12:14:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Benjamin Schweizer 2007-07-19 08:19:27 EDT
Hello there,

the current version of snack.py (from newt-0.52.6-3.fc7.i386.rpm) introduced a
change in the function EntryWindow() that breaks compatibility with older versions:

| for n in prompts:
|     if (type(n) == types.TupleType):
|         (n, e) = n
>         e = Entry(entryWidth, e)
|     else:
|         e = Entry(entryWidth)

The previous version enabled one to submit preformatted prompts in two styles:
- prompts = ['ham', 'egg']
- prompts = [Entry(20, 'ham'), Entry(20, 'egg', hidden=True)]
The latter style could be used to pass password fields etc. with the hidden
attribute. However, the change above prevents this.

As I can see, this change was first introduced in a Debian (see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340366) and somehow, this
change found its way back to Red Hat/Fedora. Thus, I expect changing the
behaviour was done by accident.

I suggest removing this patch or - if this behaviour was really desired - adding
additional type-checks to enable passing of Entry-Objects:

if type(e) == types.StringType:
    e = Entry(entryWidth, e)


Thank you.
Comment 1 Miroslav Lichvar 2007-07-19 08:38:08 EDT
It's fixed in upstream CVS, both interfaces are supported. Will be in next
Fedora update.
Comment 2 Fedora Update System 2007-08-09 12:48:41 EDT
newt-0.52.7-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 3 Fedora Update System 2007-08-17 12:13:55 EDT
newt-0.52.7-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.