rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
if (properties.has_key('creation') or properties.has_key('activity') or properties.has_key('creator')): raise ValueError, '"creation", "activity" and "creator" are '\ 'reserved' if hasattr(db, classname): raise ValueError, "Class %s already exists"%classname
def __init__(self, db, classname, **properties): #self.db = weakref.proxy(db) self.db = db self.classname = classname self.keyname = None self.ruprops = properties self.privateprops = { 'id' : hyperdb.String(), 'activity' : hyperdb.Date(), 'creation' : hyperdb.Date(), 'creator' : hyperdb.Link('user') }
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
self.keyname = None
self.key = None
def __init__(self, db, classname, **properties): #self.db = weakref.proxy(db) self.db = db self.classname = classname self.keyname = None self.ruprops = properties self.privateprops = { 'id' : hyperdb.String(), 'activity' : hyperdb.Date(), 'creation' : hyperdb.Date(), 'creator' : hyperdb.Link('user') }
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
ndx = self.getview(1).append(rowdict)
ndx = self.getview(READWRITE).append(rowdict)
def create_inner(self, **propvalues): rowdict = {} rowdict['id'] = newid = self.maxid self.maxid += 1 ndx = self.getview(1).append(rowdict) propvalues['#ISNEW'] = 1 try: self.set(str(newid), **propvalues) except Exception: self.maxid -= 1 raise return str(newid)
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
def get(self, nodeid, propname, default=_marker, cache=1): ''' 'cache' exists for backwards compatibility, and is not used. '''
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
return oldnode[propname]
raw = oldnode[propname] converter = _converters.get(rutyp.__class__, None) if converter: return converter(raw) return raw
def get(self, nodeid, propname, default=_marker, cache=1): ''' 'cache' exists for backwards compatibility, and is not used. '''
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
view = self.getview(1)
view = self.getview(READWRITE)
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb....
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
if key == self.keyname: iv = self.getindexview(1)
if key == self.key: iv = self.getindexview(READWRITE)
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb....
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
value = 0 try: v = int(value) except ValueError: raise TypeError, "%s (%s) is not numeric"%(key, repr(value))
v = 0 else: try: v = int(value) except ValueError: raise TypeError, "%s (%s) is not numeric"%(key, repr(value)) if not BACKWARDS_COMPATIBLE: if v >=0: v = v + 1
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb....
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
bv = value
bv = value if not BACKWARDS_COMPATIBLE: bv += 1
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb....
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
view = self.getview(1)
view = self.getview(READWRITE)
def retire(self, nodeid): if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' self.fireAuditors('retire', nodeid, None) view = self.getview(1) ndx = view.find(id=int(nodeid)) if ndx < 0: raise KeyError, "nodeid %s not found" % nodeid
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
if self.keyname: iv = self.getindexview(1) ndx = iv.find(k=getattr(row, self.keyname),i=row.id)
if self.key: iv = self.getindexview(READWRITE) ndx = iv.find(k=getattr(row, self.key),i=row.id)
def retire(self, nodeid): if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' self.fireAuditors('retire', nodeid, None) view = self.getview(1) ndx = view.find(id=int(nodeid)) if ndx < 0: raise KeyError, "nodeid %s not found" % nodeid
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
'''Restpre a retired node.
"""Restore a retired node.
def restore(self, nodeid): '''Restpre a retired node.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
'''
"""
def restore(self, nodeid): '''Restpre a retired node.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
view = self.getview(1)
view = self.getview(READWRITE)
def restore(self, nodeid): '''Restpre a retired node.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
if self.keyname: iv = self.getindexview(1) ndx = iv.find(k=getattr(row, self.keyname),i=row.id)
if self.key: iv = self.getindexview(READWRITE) ndx = iv.find(k=getattr(row, self.key),i=row.id)
def restore(self, nodeid): '''Restpre a retired node.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
view = self.getview(1)
view = self.getview(READWRITE)
def is_retired(self, nodeid): view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] return row._isdel
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
if self.keyname: if propname == self.keyname:
if self.key: if propname == self.key:
def setkey(self, propname): if self.keyname: if propname == self.keyname: return raise ValueError, "%s already indexed on %s"%(self.classname, self.keyname) prop = self.properties.get(propname, None) if prop is None: prop = self.privateprops.get(propname, None) if prop is None: raise KeyError, "no property %s" % propna...
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
self.keyname)
self.key)
def setkey(self, propname): if self.keyname: if propname == self.keyname: return raise ValueError, "%s already indexed on %s"%(self.classname, self.keyname) prop = self.properties.get(propname, None) if prop is None: prop = self.privateprops.get(propname, None) if prop is None: raise KeyError, "no property %s" % propna...
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
self.keyname = propname
self.key = propname
def setkey(self, propname): if self.keyname: if propname == self.keyname: return raise ValueError, "%s already indexed on %s"%(self.classname, self.keyname) prop = self.properties.get(propname, None) if prop is None: prop = self.privateprops.get(propname, None) if prop is None: raise KeyError, "no property %s" % propna...
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
return self.keyname
return self.key
def getkey(self): return self.keyname
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
raise TypeError, "%r is not a string" % keyvalue
raise TypeError, '%r is not a string'%keyvalue
def lookup(self, keyvalue): if type(keyvalue) is not _STRINGTYPE: raise TypeError, "%r is not a string" % keyvalue iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: return str(iv[ndx].i) else: view = self.getview() ndx = view.find({self.keyname:keyvalue, '_isdel':0}) if ndx > -1: return str(view[nd...
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
return str(iv[ndx].i)
view = self.getview() ndx = view.find(id=iv[ndx].i) if ndx > -1: row = view[ndx] if not row._isdel: return str(row.id)
def lookup(self, keyvalue): if type(keyvalue) is not _STRINGTYPE: raise TypeError, "%r is not a string" % keyvalue iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: return str(iv[ndx].i) else: view = self.getview() ndx = view.find({self.keyname:keyvalue, '_isdel':0}) if ndx > -1: return str(view[nd...
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
ndx = view.find({self.keyname:keyvalue, '_isdel':0})
ndx = view.find({self.key:keyvalue})
def lookup(self, keyvalue): if type(keyvalue) is not _STRINGTYPE: raise TypeError, "%r is not a string" % keyvalue iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: return str(iv[ndx].i) else: view = self.getview() ndx = view.find({self.keyname:keyvalue, '_isdel':0}) if ndx > -1: return str(view[nd...
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
return str(view[ndx].id)
row = view[ndx] if not row._isdel: return str(row.id)
def lookup(self, keyvalue): if type(keyvalue) is not _STRINGTYPE: raise TypeError, "%r is not a string" % keyvalue iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: return str(iv[ndx].i) else: view = self.getview() ndx = view.find({self.keyname:keyvalue, '_isdel':0}) if ndx > -1: return str(view[nd...
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
view = self.getview(1)
view = self.getview(READWRITE)
def destroy(self, id): view = self.getview(1) ndx = view.find(id=int(id)) if ndx > -1: if self.keyname: keyvalue = getattr(view[ndx], self.keyname) iv = self.getindexview(1) if iv: ivndx = iv.find(k=keyvalue) if ivndx > -1: iv.delete(ivndx) view.delete(ndx) self.db.destroyjournal(self.classname, id) self.db.dirty = 1
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
if self.keyname: keyvalue = getattr(view[ndx], self.keyname) iv = self.getindexview(1)
if self.key: keyvalue = getattr(view[ndx], self.key) iv = self.getindexview(READWRITE)
def destroy(self, id): view = self.getview(1) ndx = view.find(id=int(id)) if ndx > -1: if self.keyname: keyvalue = getattr(view[ndx], self.keyname) iv = self.getindexview(1) if iv: ivndx = iv.find(k=keyvalue) if ivndx > -1: iv.delete(ivndx) view.delete(ndx) self.db.destroyjournal(self.classname, id) self.db.dirty = 1
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
sv = getattr(row, nm) for sr in sv: if ids.has_key(sr.fid): return 1
if not row._isdel: sv = getattr(row, nm) for sr in sv: if ids.has_key(sr.fid): return 1
def ff(row, nm=propname, ids=ids): sv = getattr(row, nm) for sr in sv: if ids.has_key(sr.fid): return 1 return 0
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
return ids.has_key(getattr(row, nm))
return not row._isdel and ids.has_key(getattr(row, nm))
def ff(row, nm=propname, ids=ids): return ids.has_key(getattr(row, nm))
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
view = self.getview(1)
view = self.getview(READWRITE)
def import_list(self, propnames, proplist): ''' Import a node - all information including "id" is present and should not be sanity checked. Triggers are not triggered. The journal should be initialised using the "creator" and "creation" information.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
sv.append(int(entry))
sv.append((int(entry),))
def import_list(self, propnames, proplist): ''' Import a node - all information including "id" is present and should not be sanity checked. Triggers are not triggered. The journal should be initialised using the "creator" and "creation" information.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
view = self.getview(1)
view = self.getview(READWRITE)
def _clear(self): view = self.getview(1) if len(view): view[:] = [] self.db.dirty = 1 iv = self.getindexview(1) if iv: iv[:] = []
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
iv = self.getindexview(1)
iv = self.getindexview(READWRITE)
def _clear(self): view = self.getview(1) if len(view): view[:] = [] self.db.dirty = 1 iv = self.getindexview(1) if iv: iv[:] = []
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
def __getview(self): ''' Find the interface for a specific Class in the hyperdb.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
mktyp = _typmap[rutyp.__class__]
mktyp = _typmap[rutyp.__class__].upper() if nm in _columns and _columns[nm] != mktyp: raise MKBackendError("column %s for table %sis defined with multiple types"%(nm, self.classname)) _columns[nm] = mktyp
def __getview(self): ''' Find the interface for a specific Class in the hyperdb.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
v = self.db._db.getas(','.join(s))
view = self.db._db.getas(','.join(s))
def __getview(self): ''' Find the interface for a specific Class in the hyperdb.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
return v.ordered(1)
return view.ordered(1)
def __getview(self): ''' Find the interface for a specific Class in the hyperdb.
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
hyperdb.Boolean : lambda n: n, hyperdb.Number : lambda n: n,
hyperdb.Boolean : getBoolean, hyperdb.Number : getNumber,
def _fetchInterval(n): ''' Convert to a date.Interval unless the interval is '' which is our sentinel for "unset". ''' if n == '': return None return date.Interval(n)
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
if self.TRACKER_HOMES.has_key(tracker_name): tracker_home = self.TRACKER_HOMES[tracker_name] tracker = roundup.instance.open(tracker_home) else: raise client.NotFound
def inner_run_cgi(self): ''' This is the inner part of the CGI handling ''' rest = self.path
a11410f2fd8057f31e0fbd4ab0c8ba648a3d6f38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a11410f2fd8057f31e0fbd4ab0c8ba648a3d6f38/roundup_server.py
tracker = self.get_tracker(tracker_name)
def inner_run_cgi(self): ''' This is the inner part of the CGI handling ''' rest = self.path
a11410f2fd8057f31e0fbd4ab0c8ba648a3d6f38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a11410f2fd8057f31e0fbd4ab0c8ba648a3d6f38/roundup_server.py
TRACKER_HOMES = dict(self.trackers())
TRACKER_HOMES = dict(tracker_homes) TRACKERS = trackers
def get_server(self): """Return HTTP server object to run""" # redirect stdout/stderr to our logfile # this is done early to have following messages go to this logfile if self["LOGFILE"]: # appending, unbuffered sys.stdout = sys.stderr = open(self["LOGFILE"], 'a', 0) # we don't want the cgi module interpreting the comm...
a11410f2fd8057f31e0fbd4ab0c8ba648a3d6f38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a11410f2fd8057f31e0fbd4ab0c8ba648a3d6f38/roundup_server.py
def getbody(self): """Get the decoded message body.""" self.rewindbody() encoding = self.getencoding() data = None if encoding == 'base64': # BUG: is base64 really used for text encoding or # are we inserting zip files here. data = binascii.a2b_base64(self.fp.read()) elif encoding == 'quoted-printable': # the quopri mo...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def getbody(self): """Get the decoded message body.""" self.rewindbody() encoding = self.getencoding() data = None if encoding == 'base64': # BUG: is base64 really used for text encoding or # are we inserting zip files here. data = binascii.a2b_base64(self.fp.read()) elif encoding == 'quoted-printable': # the quopri mo...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def getbody(self): """Get the decoded message body.""" self.rewindbody() encoding = self.getencoding() data = None if encoding == 'base64': # BUG: is base64 really used for text encoding or # are we inserting zip files here. data = binascii.a2b_base64(self.fp.read()) elif encoding == 'quoted-printable': # the quopri mo...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def getbody(self): """Get the decoded message body.""" self.rewindbody() encoding = self.getencoding() data = None if encoding == 'base64': # BUG: is base64 really used for text encoding or # are we inserting zip files here. data = binascii.a2b_base64(self.fp.read()) elif encoding == 'quoted-printable': # the quopri mo...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def getbody(self): """Get the decoded message body.""" self.rewindbody() encoding = self.getencoding() data = None if encoding == 'base64': # BUG: is base64 really used for text encoding or # are we inserting zip files here. data = binascii.a2b_base64(self.fp.read()) elif encoding == 'quoted-printable': # the quopri mo...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def getbody(self): """Get the decoded message body.""" self.rewindbody() encoding = self.getencoding() data = None if encoding == 'base64': # BUG: is base64 really used for text encoding or # are we inserting zip files here. data = binascii.a2b_base64(self.fp.read()) elif encoding == 'quoted-printable': # the quopri mo...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def getbody(self): """Get the decoded message body.""" self.rewindbody() encoding = self.getencoding() data = None if encoding == 'base64': # BUG: is base64 really used for text encoding or # are we inserting zip files here. data = binascii.a2b_base64(self.fp.read()) elif encoding == 'quoted-printable': # the quopri mo...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def extract_content(self, parent_type=None): """Extract the body and the attachments recursively.""" content_type = self.gettype() content = None attachments = [] if content_type == 'text/plain': content = self.getbody() elif content_type[:10] == 'multipart/': for part in self.getparts(): new_content, new_attach = par...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def extract_content(self, parent_type=None): """Extract the body and the attachments recursively.""" content_type = self.gettype() content = None attachments = [] if content_type == 'text/plain': content = self.getbody() elif content_type[:10] == 'multipart/': for part in self.getparts(): new_content, new_attach = par...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
(?P<title>[^[]+)?
(?P<title>[^[]+)?
def as_attachment(self): """Return this message as an attachment.""" return (self.getname(), self.gettype(), self.getbody())
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def do_pop(self, server, user='', password='', apop=0): '''Read a series of messages from the specified POP server. ''' import getpass, poplib, socket try: if not user: user = raw_input('User: ') if not password: password = getpass.getpass() except (KeyboardInterrupt, EOFError): # Ctrl C or D maybe also Ctrl Z under Wi...
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
self.instance.config.TRACKER_NAME
config['TRACKER_NAME']
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
self.mailer.standard_message(sendto, subject, '')
self.mailer.standard_message(sendto, subject, '')
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
elif hasattr(self.instance.config, 'MAIL_DEFAULT_CLASS') and \ self.instance.config.MAIL_DEFAULT_CLASS: classname = self.instance.config.MAIL_DEFAULT_CLASS
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
m = None
classname = config['MAILGW_DEFAULT_CLASS'] if not classname: m = None
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
'''%(self.instance.config.ADMIN_EMAIL, current_class)
''' % (config['ADMIN_EMAIL'], current_class)
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
'''%(self.instance.config.ADMIN_EMAIL, errors)
'''%(config['ADMIN_EMAIL'], errors)
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
tracker_email = self.instance.config.TRACKER_EMAIL.lower()
tracker_email = config['TRACKER_EMAIL'].lower()
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
classname, nodeid, self.instance.config.MAIL_DOMAIN)
classname, nodeid, config['MAIL_DOMAIN'])
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
keep_citations = getattr(self.instance.config, 'EMAIL_KEEP_QUOTED_TEXT', 'no') == 'yes' keep_body = getattr(self.instance.config, 'EMAIL_LEAVE_BODY_UNCHANGED', 'no') == 'yes'
keep_citations = config['MAILGW_KEEP_QUOTED_TEXT'] keep_body = config['MAILGW_LEAVE_BODY_UNCHANGED']
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def handle_message(self, message): ''' message - a Message instance
5007a594beb2621dd1ac05e40b59df6d65936de3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5007a594beb2621dd1ac05e40b59df6d65936de3/mailgw.py
def inner_main(self): '''Process a request.
30727c40e68929679845b051a9072e1524353717 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/30727c40e68929679845b051a9072e1524353717/client.py
self.opendb('admin')
def determine_context(self, dre=re.compile(r'([^\d]+)0*(\d+)')): """Determine the context of this page from the URL:
30727c40e68929679845b051a9072e1524353717 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/30727c40e68929679845b051a9072e1524353717/client.py
self.opendb('admin')
def serve_file(self, designator, dre=re.compile(r'([^\d]+)(\d+)')): ''' Serve the file from the content property of the designated item. ''' m = dre.match(str(designator)) if not m: raise NotFound, str(designator) classname, nodeid = m.group(1), m.group(2)
30727c40e68929679845b051a9072e1524353717 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/30727c40e68929679845b051a9072e1524353717/client.py
def opendb(self, username): ''' Open the database and set the current user. Opens a database once. On subsequent calls only the user is set on the database object the instance.optimize is set. If we are in "Development Mode" (cf. roundup_server) then the database is always re-opened. ''' if hasattr(self, 'db') and se...
def opendb(self, username): ''' Open the database and set the current user.
30727c40e68929679845b051a9072e1524353717 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/30727c40e68929679845b051a9072e1524353717/client.py
elif isinstance(propclass, String) and p.sort_type < 2: if not isinstance(v, type([])): v = [v] v = ['%%'+self.db.sql_stringquote(s)+'%%' for s in v] where.append('(' +' and '.join(["_%s._%s LIKE '%s'"%(pln, k, s) for s in v]) +')')
elif isinstance(propclass, String): if p.sort_type < 2: if not isinstance(v, type([])): v = [v] v = ['%%'+self.db.sql_stringquote(s)+'%%' for s in v] where.append('(' +' and '.join(["_%s._%s LIKE '%s'"%(pln, k, s) for s in v]) +')') if p.sort_type > 0: oc = ac = 'lower(_%s._%s)'%(pln, k)
def filter(self, search_matches, filterspec, sort=[], group=[]): '''Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec
326e7aa8ed9bb9afb9ad23f0bb790c3a17cc4b80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/326e7aa8ed9bb9afb9ad23f0bb790c3a17cc4b80/rdbms_common.py
if not self.editItemPermission(props):
if not self.editItemPermission(props, classname=cn, itemid=nodeid):
def _changenode(self, cn, nodeid, props): """Change the node based on the contents of the form.""" # check for permission if not self.editItemPermission(props): raise exceptions.Unauthorised, self._( 'You do not have permission to edit %(class)s' ) % {'class': cn}
0ef71a239116ae30ea18b515dd5de3d607ffbbb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0ef71a239116ae30ea18b515dd5de3d607ffbbb4/actions.py
if not self.newItemPermission(props):
if not self.newItemPermission(props, classname=cn):
def _createnode(self, cn, props): """Create a node based on the contents of the form.""" # check for permission if not self.newItemPermission(props): raise exceptions.Unauthorised, self._( 'You do not have permission to create %(class)s' ) % {'class': cn}
0ef71a239116ae30ea18b515dd5de3d607ffbbb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0ef71a239116ae30ea18b515dd5de3d607ffbbb4/actions.py
def editItemPermission(self, props):
_cn_marker = [] def editItemPermission(self, props, classname=_cn_marker, itemid=None):
def editItemPermission(self, props): """Determine whether the user has permission to edit this item.
0ef71a239116ae30ea18b515dd5de3d607ffbbb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0ef71a239116ae30ea18b515dd5de3d607ffbbb4/actions.py
if self.hasPermission('Edit', itemid=self.nodeid):
if itemid is None: itemid = self.nodeid if classname is self._cn_marker: classname = self.classname if self.hasPermission('Edit', itemid=itemid, classname=classname):
def editItemPermission(self, props): """Determine whether the user has permission to edit this item.
0ef71a239116ae30ea18b515dd5de3d607ffbbb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0ef71a239116ae30ea18b515dd5de3d607ffbbb4/actions.py
def newItemPermission(self, props):
def newItemPermission(self, props, classname=None):
def newItemPermission(self, props): """Determine whether the user has permission to create this item.
0ef71a239116ae30ea18b515dd5de3d607ffbbb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0ef71a239116ae30ea18b515dd5de3d607ffbbb4/actions.py
return self.hasPermission('Create')
if not classname : classname = self.client.classname return self.hasPermission('Create', classname=classname)
def newItemPermission(self, props): """Determine whether the user has permission to create this item.
0ef71a239116ae30ea18b515dd5de3d607ffbbb4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0ef71a239116ae30ea18b515dd5de3d607ffbbb4/actions.py
try: reload(cgitb)
if self.DEBUG_MODE: try: reload(cgitb) self.wfile.write(cgitb.breaker()) self.wfile.write(cgitb.html()) except: s = StringIO.StringIO() traceback.print_exc(None, s) self.wfile.write("<pre>") self.wfile.write(cgi.escape(s.getvalue())) self.wfile.write("</pre>\n") else:
def run_cgi(self): """ Execute the CGI command. Wrap an innner call in an error handler so all errors can be caught. """ save_stdin = sys.stdin sys.stdin = self.rfile try: self.inner_run_cgi() except client.NotFound: self.send_error(404, self.path) except client.Unauthorised, message: self.send_error(403, '%s (%s)'%(se...
7a2c2ed71918a0eb5ed56803e74e2aa07443850c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7a2c2ed71918a0eb5ed56803e74e2aa07443850c/roundup_server.py
self.wfile.write(cgitb.html()) except: s = StringIO.StringIO() traceback.print_exc(None, s) self.wfile.write("<pre>") self.wfile.write(cgi.escape(s.getvalue())) self.wfile.write("</pre>\n")
ts = time.ctime() self.wfile.write('''<p>%s: An error occurred. Please check the server log for more infomation.</p>'''%ts) print 'EXCEPTION AT', ts traceback.print_exc()
def run_cgi(self): """ Execute the CGI command. Wrap an innner call in an error handler so all errors can be caught. """ save_stdin = sys.stdin sys.stdin = self.rfile try: self.inner_run_cgi() except client.NotFound: self.send_error(404, self.path) except client.Unauthorised, message: self.send_error(403, '%s (%s)'%(se...
7a2c2ed71918a0eb5ed56803e74e2aa07443850c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7a2c2ed71918a0eb5ed56803e74e2aa07443850c/roundup_server.py
def testGranularity(self): ae = self.assertEqual ae(str(Date('2003-2-12', add_granularity=1)), '2003-02-12.23:59:59') ae(str(Date('2003-1-1.23:00', add_granularity=1)), '2003-01-01.23:00:59') ae(str(Date('2003', add_granularity=1)), '2003-12-31.23:59:59') ae(str(Date('2003-5', add_granularity=1)), '2003-05-31.23:59:59'...
f77cdf82a65254fd24ea6d7448afa17fe4828bad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f77cdf82a65254fd24ea6d7448afa17fe4828bad/test_dates.py
ae('01:00:00', 'in an hour')
ae('01:00:00', 'in an hour')
def ae(spec, pretty): self.assertEqual(Interval(spec).pretty(), pretty)
f77cdf82a65254fd24ea6d7448afa17fe4828bad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f77cdf82a65254fd24ea6d7448afa17fe4828bad/test_dates.py
def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(DateTestCase)) return suite
f77cdf82a65254fd24ea6d7448afa17fe4828bad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f77cdf82a65254fd24ea6d7448afa17fe4828bad/test_dates.py
def lock(file, flags): hfile = win32file._get_osfhandle(file.fileno()) win32file.LockFileEx(hfile, flags, 0, 0xffff0000, __overlapped) def unlock(file): hfile = win32file._get_osfhandle(file.fileno()) win32file.UnlockFileEx(hfile, 0, 0xffff0000, __overlapped)
def lock(file, flags): hfile = win32file._get_osfhandle(file.fileno()) try: win32file.LockFileEx(hfile, flags, 0, 0xffff0000, __overlapped) except win32file.error, e: import winerror if e[0] != winerror.ERROR_CALL_NOT_IMPLEMENTED: raise e if not flags & LOCK_EX: import warnings warnings.warn("PortaLocker does ...
def lock(file, flags): hfile = win32file._get_osfhandle(file.fileno()) win32file.LockFileEx(hfile, flags, 0, 0xffff0000, __overlapped)
a70e12d549f6ab39358b183ce901d033bd87a441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a70e12d549f6ab39358b183ce901d033bd87a441/portalocker.py
def lock(file, flags): fcntl.flock(file.fileno(), flags)
def lock(file, flags): fcntl.flock(file.fileno(), flags)
def lock(file, flags): fcntl.flock(file.fileno(), flags)
a70e12d549f6ab39358b183ce901d033bd87a441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a70e12d549f6ab39358b183ce901d033bd87a441/portalocker.py
def unlock(file): fcntl.flock(file.fileno(), fcntl.LOCK_UN)
def unlock(file): fcntl.flock(file.fileno(), fcntl.LOCK_UN)
def unlock(file): fcntl.flock(file.fileno(), fcntl.LOCK_UN)
a70e12d549f6ab39358b183ce901d033bd87a441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a70e12d549f6ab39358b183ce901d033bd87a441/portalocker.py
from time import time, strftime, localtime import sys import portalocker
from time import time, strftime, localtime import sys import portalocker
def unlock(file): fcntl.flock(file.fileno(), fcntl.LOCK_UN)
a70e12d549f6ab39358b183ce901d033bd87a441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a70e12d549f6ab39358b183ce901d033bd87a441/portalocker.py
log = open('log.txt', "a+") portalocker.lock(log, portalocker.LOCK_EX)
log = open('log.txt', "a+") portalocker.lock(log, portalocker.LOCK_EX)
def unlock(file): fcntl.flock(file.fileno(), fcntl.LOCK_UN)
a70e12d549f6ab39358b183ce901d033bd87a441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a70e12d549f6ab39358b183ce901d033bd87a441/portalocker.py
timestamp = strftime("%m/%d/%Y %H:%M:%S\n", localtime(time())) log.write( timestamp )
timestamp = strftime("%m/%d/%Y %H:%M:%S\n", localtime(time())) log.write( timestamp )
def unlock(file): fcntl.flock(file.fileno(), fcntl.LOCK_UN)
a70e12d549f6ab39358b183ce901d033bd87a441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a70e12d549f6ab39358b183ce901d033bd87a441/portalocker.py
print "Wrote lines. Hit enter to release lock." dummy = sys.stdin.readline()
print "Wrote lines. Hit enter to release lock." dummy = sys.stdin.readline()
def unlock(file): fcntl.flock(file.fileno(), fcntl.LOCK_UN)
a70e12d549f6ab39358b183ce901d033bd87a441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a70e12d549f6ab39358b183ce901d033bd87a441/portalocker.py
log.close()
log.close()
def unlock(file): fcntl.flock(file.fileno(), fcntl.LOCK_UN)
a70e12d549f6ab39358b183ce901d033bd87a441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a70e12d549f6ab39358b183ce901d033bd87a441/portalocker.py
user = 'anonymous'
def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin')
35909d931cbaf91b992743121e746286adec065f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/35909d931cbaf91b992743121e746286adec065f/client.py
try: user = os.getenv('REMOTE_USER') except KeyError: pass
if self.env.has_key('REMOTE_USER'): user = self.env['REMOTE_USER'] else: user = 'anonymous'
def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin')
35909d931cbaf91b992743121e746286adec065f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/35909d931cbaf91b992743121e746286adec065f/client.py
linkcl.classname, itemid=id)]
linkcl.classname, itemid=opt)]
def menu(self, size=None, height=None, showid=0, additional=[], value=None, sort_on=None, **conditions): ''' Render a form select list for this property
e03881d6046073b4c25b6586b07cb4e4518597c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e03881d6046073b4c25b6586b07cb4e4518597c1/templating.py
linkcl.classname, itemid=id)]
linkcl.classname, itemid=opt)]
def menu(self, size=None, height=None, showid=0, additional=[], value=None, sort_on=None, **conditions): ''' Render a form <select> list for this property.
e03881d6046073b4c25b6586b07cb4e4518597c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e03881d6046073b4c25b6586b07cb4e4518597c1/templating.py
frum.append('_%s as _%s' % (cn, ln))
if p.sort_type == 0: frum.append('_%s as _%s' % (cn, ln))
def filter(self, search_matches, filterspec, sort=[], group=[]): '''Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec
732ee272e4e5b12e235dd432cfb8872ac65f98e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/732ee272e4e5b12e235dd432cfb8872ac65f98e1/rdbms_common.py
if p.tree_sort_done and (p.sort_type == 2 or not p.children):
if p.tree_sort_done and p.sort_type > 0:
def filter(self, search_matches, filterspec, sort=[], group=[]): '''Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec
732ee272e4e5b12e235dd432cfb8872ac65f98e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/732ee272e4e5b12e235dd432cfb8872ac65f98e1/rdbms_common.py
if not self.db.security.hasPermission('Edit', author, classname):
if not self.db.security.hasPermission('Edit', author, classname, itemid=nodeid):
def handle_message(self, message): ''' message - a Message instance
6e6a2a1025276b2e2324f910ac593af84b81333c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6e6a2a1025276b2e2324f910ac593af84b81333c/mailgw.py
p = db.security.getPermission('View', 'issue') db.security.addPermissionToRole('Anonymous', p)
for cl in 'issue', 'file', 'msg', 'keyword': p = db.security.getPermission('View', cl) db.security.addPermissionToRole('Anonymous', p)
def open(name=None): ''' as from the roundupdb method openDB ''' from roundup.hyperdb import String, Password, Date, Link, Multilink from roundup.hyperdb import Interval, Boolean, Number # open the database db = Database(config, name) # # Now initialise the schema. Must do this each time the database is # opened. # ...
e964acf730d41a234b310db809e234483bbe7651 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e964acf730d41a234b310db809e234483bbe7651/dbinit.py
def menu(self, size=None, height=None, showid=0, additional=[],
def menu(self, size=None, height=None, showid=0, additional=[], value=None,
def menu(self, size=None, height=None, showid=0, additional=[], sort_on=None, **conditions): ''' Render a form select list for this property
5b1813e3f3108a95ebc7661eae8787addf7d4e2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5b1813e3f3108a95ebc7661eae8787addf7d4e2e/templating.py
value = self._value
if value is None: value = self._value
def menu(self, size=None, height=None, showid=0, additional=[], sort_on=None, **conditions): ''' Render a form select list for this property
5b1813e3f3108a95ebc7661eae8787addf7d4e2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5b1813e3f3108a95ebc7661eae8787addf7d4e2e/templating.py
sort_on=None, **conditions):
value=None, sort_on=None, **conditions):
def menu(self, size=None, height=None, showid=0, additional=[], sort_on=None, **conditions): ''' Render a form <select> list for this property.
5b1813e3f3108a95ebc7661eae8787addf7d4e2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5b1813e3f3108a95ebc7661eae8787addf7d4e2e/templating.py