comparison roundup/roundupdb.py @ 263:e13d55912cd4

Forgot to pass the protected flag down *sigh*.
author Richard Jones <richard@users.sourceforge.net>
date Thu, 04 Oct 2001 02:16:15 +0000
parents ab921dc53ccd
children e32af1eff4ea
comparison
equal deleted inserted replaced
262:ab921dc53ccd 263:e13d55912cd4
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: roundupdb.py,v 1.11 2001-10-04 02:12:42 richard Exp $ 18 # $Id: roundupdb.py,v 1.12 2001-10-04 02:16:15 richard Exp $
19 19
20 import re, os, smtplib, socket 20 import re, os, smtplib, socket
21 21
22 import hyperdb, date 22 import hyperdb, date
23 23
123 """In addition to the actual properties on the node, these 123 """In addition to the actual properties on the node, these
124 methods provide the "creation" and "activity" properties. If the 124 methods provide the "creation" and "activity" properties. If the
125 "protected" flag is true, we include protected properties - those 125 "protected" flag is true, we include protected properties - those
126 which may not be modified. 126 which may not be modified.
127 """ 127 """
128 d = hyperdb.Class.getprops(self).copy() 128 d = hyperdb.Class.getprops(self, protected=protected).copy()
129 if protected: 129 if protected:
130 d['creation'] = hyperdb.Date() 130 d['creation'] = hyperdb.Date()
131 d['activity'] = hyperdb.Date() 131 d['activity'] = hyperdb.Date()
132 d['creator'] = hyperdb.Link("user") 132 d['creator'] = hyperdb.Link("user")
133 return d 133 return d
184 ''' In addition to the actual properties on the node, these methods 184 ''' In addition to the actual properties on the node, these methods
185 provide the "content" property. If the "protected" flag is true, 185 provide the "content" property. If the "protected" flag is true,
186 we include protected properties - those which may not be 186 we include protected properties - those which may not be
187 modified. 187 modified.
188 ''' 188 '''
189 d = Class.getprops(self).copy() 189 d = Class.getprops(self, protected=protected).copy()
190 if protected: 190 if protected:
191 d['content'] = hyperdb.String() 191 d['content'] = hyperdb.String()
192 return d 192 return d
193 193
194 # XXX deviation from spec - was called ItemClass 194 # XXX deviation from spec - was called ItemClass
287 %s 287 %s
288 '''%('_'*len(web), self.ISSUE_TRACKER_EMAIL, web) 288 '''%('_'*len(web), self.ISSUE_TRACKER_EMAIL, web)
289 289
290 # 290 #
291 # $Log: not supported by cvs2svn $ 291 # $Log: not supported by cvs2svn $
292 # Revision 1.11 2001/10/04 02:12:42 richard
293 # Added nicer command-line item adding: passing no arguments will enter an
294 # interactive more which asks for each property in turn. While I was at it, I
295 # fixed an implementation problem WRT the spec - I wasn't raising a
296 # ValueError if the key property was missing from a create(). Also added a
297 # protected=boolean argument to getprops() so we can list only the mutable
298 # properties (defaults to yes, which lists the immutables).
299 #
292 # Revision 1.10 2001/08/07 00:24:42 richard 300 # Revision 1.10 2001/08/07 00:24:42 richard
293 # stupid typo 301 # stupid typo
294 # 302 #
295 # Revision 1.9 2001/08/07 00:15:51 richard 303 # Revision 1.9 2001/08/07 00:15:51 richard
296 # Added the copyright/license notice to (nearly) all files at request of 304 # Added the copyright/license notice to (nearly) all files at request of

Roundup Issue Tracker: http://roundup-tracker.org/