Mercurial > p > roundup > code
diff frontends/ZRoundup/ZRoundup.py @ 2869:908c27314abf
merge from maint-0-7
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 05 Nov 2004 04:42:45 +0000 |
| parents | a9e1fff1e793 |
| children | 49aa59c581c7 65bc031c4464 |
line wrap: on
line diff
--- a/frontends/ZRoundup/ZRoundup.py Thu Nov 04 00:31:53 2004 +0000 +++ b/frontends/ZRoundup/ZRoundup.py Fri Nov 05 04:42:45 2004 +0000 @@ -14,7 +14,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: ZRoundup.py,v 1.19 2004-07-27 00:57:17 richard Exp $ +# $Id: ZRoundup.py,v 1.20 2004-11-05 04:42:45 richard Exp $ # ''' ZRoundup module - exposes the roundup web interface to Zope @@ -75,18 +75,14 @@ self.value = value if hasattr(self.value, 'filename'): self.filename = self.value.filename - self.file = self.value + self.value = self.value.read() class FormWrapper: '''Make a Zope form dict look like a cgi.py one ''' def __init__(self, form): self.form = form - self.value = [] def __getitem__(self, item): - for entry in self.value: - if entry.name == item: - return entry entry = self.form[item] if isinstance(entry, type([])): entry = map(FormItem, entry) @@ -97,18 +93,11 @@ if self.form.has_key(key): return self.form[key] else: - return default + return default def has_key(self, item): - for entry in self.value: - if entry.name == item: - return 1 return self.form.has_key(item) def keys(self): - l = [e.name for e in self.value] - for name in self.form.keys(): - if name not in l: - l.append(name) - return l + return self.form.keys(): class ZRoundup(Item, PropertyManager, Implicit, Persistent): '''An instance of this class provides an interface between Zope and
