bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def local(self, offset): ''' Return the date/time as a local (timezone offset) date/time. ''' self.view_check()
def local(self, offset): ''' Return the date/time as a local (timezone offset) date/time. ''' self.view_check()
33,800
def hasPermission(self, permission, classname=_marker): """Check whether the user has 'permission' on the current class.""" if classname is self._marker: classname = self.client.classname return self.db.security.hasPermission(permission, self.client.userid, classname)
def hasPermission(self, permission, classname=_marker, itemid=None): """Check whether the user has 'permission' on the current class.""" if classname is self._marker: classname = self.client.classname return self.db.security.hasPermission(permission, self.client.userid, classname)
33,801
def hasPermission(self, permission, classname=_marker): """Check whether the user has 'permission' on the current class.""" if classname is self._marker: classname = self.client.classname return self.db.security.hasPermission(permission, self.client.userid, classname)
def hasPermission(self, permission, classname=_marker): """Check whether the user has 'permission' on the current class.""" if classname is self._marker: classname = self.client.classname return self.db.security.hasPermission(permission, self.client.userid, classname)
33,802
def editItemPermission(self, props): """Determine whether the user has permission to edit this item.
def editItemPermission(self, props): """Determine whether the user has permission to edit this item.
33,803
def set(self, spec, offset=0, date_re=re.compile(r''' (((?P<y>\d\d\d\d)-)?((?P<m>\d\d)-(?P<d>\d\d))?)? # yyyy-mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d))?)? # hh:mm:ss (?P<o>.+)? # offset ''', re.VERBOSE)): ''' set the da...
def set(self, spec, offset=0, date_re=re.compile(r''' (((?P<y>\d\d\d\d)-)?((?P<m>\d\d)-(?P<d>\d\d))?)? # yyyy-mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d))?)? # hh:mm:ss (?P<o>.+)? # offset ''', re.VERBOSE)): ''' set the da...
33,804
def _opendb(self): '''Open the roundup instance database for a transaction. ''' instance = roundup.instance.open(self.instance_home) request = RequestWrapper(self.REQUEST['RESPONSE']) env = self.REQUEST.environ
def_opendb(self):'''Opentheroundupinstancedatabaseforatransaction.'''instance=roundup.instance.open(self.instance_home)request=RequestWrapper(self.REQUEST['RESPONSE'])env=self.REQUEST.environ
33,805
def __getitem__(self, item): '''All other URL accesses are passed throuh to roundup ''' try: client = self._opendb() # fake the path that roundup should use client.split_path = [item] # and call roundup to do something client.main() return '' except NotFound: raise 'NotFound', self.REQUEST.URL pass except: import trace...
def __getitem__(self, item): '''All other URL accesses are passed throuh to roundup ''' try: client = self._opendb() # fake the path that roundup should use client.path = item # and call roundup to do something client.main() return '' except NotFound: raise 'NotFound', self.REQUEST.URL pass except: import traceback tra...
33,806
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts' ] installd...
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts' ] installd...
33,807
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts' ] installd...
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts' ] installd...
33,808
def determine_db_type(self, path): ''' determine which DB wrote the class file ''' db_type = '' if os.path.exists(path): db_type = whichdb.whichdb(path) if not db_type: raise hyperdb.DatabaseError, "Couldn't identify database type" elif os.path.exists(path+'.db'): # if the path ends in '.db', it's a dbm database, wheth...
def cache_db_type(self, path): ''' determine which DB wrote the class file, and cache it as an attribute of __class__ (to allow for subclassed DBs to be different sorts) ''' db_type = '' if os.path.exists(path): db_type = whichdb.whichdb(path) if not db_type: raise hyperdb.DatabaseError, "Couldn't identify database typ...
33,809
def determine_db_type(self, path): ''' determine which DB wrote the class file ''' db_type = '' if os.path.exists(path): db_type = whichdb.whichdb(path) if not db_type: raise hyperdb.DatabaseError, "Couldn't identify database type" elif os.path.exists(path+'.db'): # if the path ends in '.db', it's a dbm database, wheth...
def determine_db_type(self, path): ''' determine which DB wrote the class file ''' db_type = '' if os.path.exists(path): db_type = whichdb.whichdb(path) if not db_type: raise hyperdb.DatabaseError, "Couldn't identify database type" elif os.path.exists(path+'.db'): # if the path ends in '.db', it's a dbm database, wheth...
33,810
def opendb(self, mode): '''Low-level database opener that gets around anydbm/dbm eccentricities. ''' # figure the class db type path = os.path.join(os.getcwd(), self.dir, self.name) db_type = self.determine_db_type(path)
def opendb(self, mode): '''Low-level database opener that gets around anydbm/dbm eccentricities. ''' # figure the class db type path = os.path.join(os.getcwd(), self.dir, self.name) db_type = self.determine_db_type(path)
33,811
def content(self): ''' Callback used by the page template to render the content of the page.
def content(self): ''' Callback used by the page template to render the content of the page.
33,812
def handle_action(self): ''' Determine whether there should be an _action called.
def handle_action(self): ''' Determine whether there should be an _action called.
33,813
def login_action(self): ''' Attempt to log a user in and set the cookie ''' # we need the username at a minimum if not self.form.has_key('__login_name'): self.error_message.append(_('Username required')) return
def loginAction(self): ''' Attempt to log a user in. Sets up a session for the user which contains the login credentials. ''' # we need the username at a minimum if not self.form.has_key('__login_name'): self.error_message.append(_('Username required')) return
33,814
def login_action(self): ''' Attempt to log a user in and set the cookie ''' # we need the username at a minimum if not self.form.has_key('__login_name'): self.error_message.append(_('Username required')) return
def if not self.loginPermission(): self.make_user_anonymous() raise Unauthorised, _("You do not have permission to login") login_action(self): if not self.loginPermission(): self.make_user_anonymous() raise Unauthorised, _("You do not have permission to login") ''' if not self.loginPermission(): self.make_user_anonymou...
33,815
def searchAction(self): ''' Mangle some of the form variables.
defsearchAction(self):'''Manglesomeoftheformvariables.
33,816
def nosymessage(self, nodeid, msgid, oldvalues, whichnosy='nosy', from_address=None, cc=[]): #, bcc=[]): """Send a message to the members of an issue's nosy list.
def nosymessage(self, nodeid, msgid, oldvalues, whichnosy='nosy', from_address=None, cc=[]): #, bcc=[]): """Send a message to the members of an issue's nosy list.
33,817
def copy_scripts(self): """ Create each script listed in 'self.scripts' """ if not self.package_name: raise Exception("You have to inherit build_scripts_create and" " provide a package name")
def copy_scripts(self): """ Create each script listed in 'self.scripts' """ if not self.package_name: raise Exception("You have to inherit build_scripts_create and" " provide a package name")
33,818
def copy_scripts(self): """ Create each script listed in 'self.scripts' """ if not self.package_name: raise Exception("You have to inherit build_scripts_create and" " provide a package name")
def copy_scripts(self): """ Create each script listed in 'self.scripts' """ if not self.package_name: raise Exception("You have to inherit build_scripts_create and" " provide a package name")
33,819
def pack(self, pack_before): pass
def pack(self, pack_before): pass
33,820
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) # tableid:I,nodeid:I,date:I,user:I,action:I,params:B self.hist.append(tableid=tblid, nodeid=int(nodeid), date=int(time.time()), action=action, user = self.curuserid, par...
def addjournal(self, tablenm, nodeid, action, params, creator=None, creation=None): try: tblid = self.tables.find(name=tablenm) except ValueError: open('/u/roundup-sf/roundup/error.out','w').write('\nself.tables=%s, tablenm=%s\n' % (self.tables.structure(), tablenm)) raise if tblid == -1: tblid = self.tables.append(nam...
33,821
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) # tableid:I,nodeid:I,date:I,user:I,action:I,params:B self.hist.append(tableid=tblid, nodeid=int(nodeid), date=int(time.time()), action=action, user = self.curuserid, par...
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) # tableid:I,nodeid:I,date:I,user:I,action:I,params:B self.hist.append(tableid=tblid, nodeid=int(nodeid), date=creation, action=action, user = self.curuserid, params = ma...
33,822
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) # tableid:I,nodeid:I,date:I,user:I,action:I,params:B self.hist.append(tableid=tblid, nodeid=int(nodeid), date=int(time.time()), action=action, user = self.curuserid, par...
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) # tableid:I,nodeid:I,date:I,user:I,action:I,params:B self.hist.append(tableid=tblid, nodeid=int(nodeid), date=int(time.time()), action=action, user = creator, params = m...
33,823
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %...
def getjournal(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %...
33,824
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %...
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %r" % row.params params = {} usern...
33,825
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %...
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %...
33,826
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %...
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %...
33,827
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....
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....
33,828
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....
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....
33,829
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....
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....
33,830
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....
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....
33,831
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....
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....
33,832
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....
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....
33,833
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....
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....
33,834
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....
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....
33,835
def history(self, nodeid): if not self.do_journal: raise ValueError, 'Journalling is disabled for this class' return self.db.gethistory(self.classname, nodeid)
def history(self, nodeid): if not self.do_journal: raise ValueError, 'Journalling is disabled for this class' return self.db.gethistory(self.classname, nodeid)
33,836
def destroy(self, keyvalue): #TODO clean this up once Richard's said how it should work iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: id = iv[ndx].i iv.delete(ndx) view = self.getview() ndx = view.find(id=id) if ndx > -1: view.delete(ndx)
def destroy(self, keyvalue): #TODO clean this up once Richard's said how it should work iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: id = iv[ndx].i iv.delete(ndx) view = self.getview() ndx = view.find(id=id) if ndx > -1: view.delete(ndx)
33,837
def setid(self, classname, setid): ''' Set the id counter: used during import of database ''' cursor = self.conn.cursor() sql = 'update ids set num=%s where name=%s'%(self.arg, self.arg) vals = (setid, spec.classname) if __debug__: print >>hyperdb.DEBUG, 'setid', (self, sql, vals) cursor.execute(sql, vals)
def setid(self, classname, setid): ''' Set the id counter: used during import of database ''' cursor = self.conn.cursor() sql = 'update ids set num=%s where name=%s'%(self.arg, self.arg) vals = (setid, classname) if __debug__: print >>hyperdb.DEBUG, 'setid', (self, sql, vals) cursor.execute(sql, vals)
33,838
def testDate(self): ae = self.assertEqual date = Date("2000-04-17") ae(str(date), '2000-04-17.00:00:00') date = Date("01-25") y, m, d, x, x, x, x, x, x = time.gmtime() ae(str(date), '%s-01-25.00:00:00'%y) date = Date("2000-04-17.03:45") ae(str(date), '2000-04-17.03:45:00') date = Date("08-13.22:13") ae(str(date), '%s-0...
def testDate(self): ae = self.assertEqual date = Date("2000-04-17") ae(str(date), '2000-04-17.00:00:00') date = Date("01-25") y, m, d, x, x, x, x, x, x = time.gmtime(time.time()) ae(str(date), '%s-01-25.00:00:00'%y) date = Date("2000-04-17.03:45") ae(str(date), '2000-04-17.03:45:00') date = Date("08-13.22:13") ae(str(d...
33,839
def testOffset(self): ae = self.assertEqual date = Date("2000-04-17", -5) ae(str(date), '2000-04-17.00:00:00') date = Date("01-25", -5) y, m, d, x, x, x, x, x, x = time.gmtime() ae(str(date), '%s-01-25.00:00:00'%y) date = Date("2000-04-17.03:45", -5) ae(str(date), '2000-04-17.08:45:00') date = Date("08-13.22:13", -5) a...
def testOffset(self): ae = self.assertEqual date = Date("2000-04-17", -5) ae(str(date), '2000-04-17.00:00:00') date = Date("01-25", -5) y, m, d, x, x, x, x, x, x = time.gmtime(time.time()) ae(str(date), '%s-01-25.00:00:00'%y) date = Date("2000-04-17.03:45", -5) ae(str(date), '2000-04-17.08:45:00') date = Date("08-13.22...
33,840
def email_signature(self, nodeid, msgid): ''' Add a signature to the e-mail with some useful information '''
def email_signature(self, nodeid, msgid): ''' Add a signature to the e-mail with some useful information '''
33,841
def generateChangeNote(self, nodeid, oldvalues): """Generate a change note that lists property changes """ cn = self.classname cl = self.db.classes[cn] changed = {} props = cl.getprops(protected=0)
def generateChangeNote(self, nodeid, oldvalues): """Generate a change note that lists property changes """ cn = self.classname cl = self.db.classes[cn] changed = {} props = cl.getprops(protected=0)
33,842
def generateChangeNote(self, nodeid, oldvalues): """Generate a change note that lists property changes """ cn = self.classname cl = self.db.classes[cn] changed = {} props = cl.getprops(protected=0)
def generateChangeNote(self, nodeid, oldvalues): """Generate a change note that lists property changes """ cn = self.classname cl = self.db.classes[cn] changed = {} props = cl.getprops(protected=0)
33,843
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,844
def testCorrectLogin(self): self.client.db.security.hasPermission = lambda a,b,c: True
def testCorrectLogin(self): self.client.db.security.hasPermission = lambda a,b,c: True
33,845
def testNewIssueAuthMsg(self): message = cStringIO.StringIO('''Content-Type: text/plain;
def testNewIssueAuthMsg(self): message = cStringIO.StringIO('''Content-Type: text/plain;
33,846
def testSimpleFollowup(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
def testSimpleFollowup(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
33,847
def testFollowup(self): self.doNewIssue()
def testFollowup(self): self.doNewIssue()
33,848
def testFollowupTitleMatch(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
def testFollowupTitleMatch(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
33,849
def testFollowupNosyAuthor(self): self.doNewIssue() self.db.config.ADD_AUTHOR_TO_NOSY = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
def testFollowupNosyAuthor(self): self.doNewIssue() self.db.config.ADD_AUTHOR_TO_NOSY = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
33,850
def testFollowupNosyRecipients(self): self.doNewIssue() self.db.config.ADD_RECIPIENTS_TO_NOSY = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
def testFollowupNosyRecipients(self): self.doNewIssue() self.db.config.ADD_RECIPIENTS_TO_NOSY = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
33,851
def testFollowupNosyAuthorAndCopy(self): self.doNewIssue() self.db.config.ADD_AUTHOR_TO_NOSY = 'yes' self.db.config.MESSAGES_TO_AUTHOR = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
def testFollowupNosyAuthorAndCopy(self): self.doNewIssue() self.db.config.ADD_AUTHOR_TO_NOSY = 'yes' self.db.config.MESSAGES_TO_AUTHOR = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
33,852
def testFollowupNoNosyAuthor(self): self.doNewIssue() self.instance.config.ADD_AUTHOR_TO_NOSY = 'no' message = cStringIO.StringIO('''Content-Type: text/plain;
def testFollowupNoNosyAuthor(self): self.doNewIssue() self.instance.config.ADD_AUTHOR_TO_NOSY = 'no' message = cStringIO.StringIO('''Content-Type: text/plain;
33,853
def testFollowupNoNosyRecipients(self): self.doNewIssue() self.instance.config.ADD_RECIPIENTS_TO_NOSY = 'no' message = cStringIO.StringIO('''Content-Type: text/plain;
def testFollowupNoNosyRecipients(self): self.doNewIssue() self.instance.config.ADD_RECIPIENTS_TO_NOSY = 'no' message = cStringIO.StringIO('''Content-Type: text/plain;
33,854
def testEnc01(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
def testEnc01(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
33,855
def testMultipartEnc01(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
def testMultipartEnc01(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
33,856
def testFollowupStupidQuoting(self): self.doNewIssue()
def testFollowupStupidQuoting(self): self.doNewIssue()
33,857
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 PermissionError, 'You do not have permission to edit %s'%cn
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 PermissionError, 'You do not have permission to edit %s'%cn
33,858
def _createnode(self, cn, props): ''' create a node based on the contents of the form ''' # check for permission if not self.newItemPermission(props): raise PermissionError, 'You do not have permission to create %s'%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 PermissionError, 'You do not have permission to create %s'%cn
33,859
def get(self, nodeid, propname, default=_marker, cache=1): ''' 'cache' exists for backwards compatibility, and is not used. ''' view = self.getview() id = int(nodeid) if cache == 0: oldnode = self.uncommitted.get(id, None) if oldnode and oldnode.has_key(propname): raw = oldnode[propname] converter = _converters.get(rut...
def get(self, nodeid, propname, default=_marker, cache=1): ''' 'cache' exists for backwards compatibility, and is not used. ''' view = self.getview() id = int(nodeid) if cache == 0: oldnode = self.uncommitted.get(id, None) if oldnode and oldnode.has_key(propname): raw = oldnode[propname] converter = _converters.get(rut...
33,860
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(READWRITE) ndx = view.find(id=int(nodeid)) if ndx < 0: raise KeyError, "nodeid %s not found" % nodeid
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(READWRITE) ndx = view.find(id=int(nodeid)) if ndx < 0: raise KeyError, "nodeid %s not found" % nodeid
33,861
def str2value(self, value): try: roundup.date.get_timezone(value) except KeyError: raise OptionValueError(self, value, "Timezone name or numeric hour offset required") return value
def str2value(self, value): try: roundup.date.get_timezone(value) except KeyError: raise OptionValueError(self, value, "Timezone name or numeric hour offset required") return value
33,862
def render(self, filterspec={}, filter=[], columns=[], sort=[], group=[], show_display_form=1, nodeids=None, show_customization=1): self.filterspec = filterspec
def render(self, filterspec={}, filter=[], columns=[], sort=[], group=[], show_display_form=1, nodeids=None, show_customization=1): self.filterspec = filterspec
33,863
def inner_run_cgi(self): ''' This is the inner part of the CGI handling ''' rest = self.path
def inner_run_cgi(self): ''' This is the inner part of the CGI handling ''' rest = self.path
33,864
def generateCreateNote(self, nodeid): """Generate a create note that lists initial property values """ cn = self.classname cl = self.db.classes[cn] props = cl.getprops(protected=0)
def generateCreateNote(self, nodeid): """Generate a create note that lists initial property values """ cn = self.classname cl = self.db.classes[cn] props = cl.getprops(protected=0)
33,865
def generateChangeNote(self, nodeid, oldvalues): """Generate a change note that lists property changes """ if not isinstance(oldvalues, type({})): raise TypeError("'oldvalues' must be dict-like, not %s."% type(oldvalues))
def generateChangeNote(self, nodeid, oldvalues): """Generate a change note that lists property changes """ if not isinstance(oldvalues, type({})): raise TypeError("'oldvalues' must be dict-like, not %s."% type(oldvalues))
33,866
def do_initialise(self, instance_home, args): '''Usage: initialise [template [backend [admin password]]] Initialise a new Roundup instance.
def do_initialise(self, instance_home, args): '''Usage: initialise [template [backend [admin password]]] Initialise a new Roundup instance.
33,867
def sortfun(a, b, sort=sort, group=group, properties=self.getprops(), db = self.db, cl=self): a_id, an = a b_id, bn = b # sort by group and then sort for dir, prop in group, sort: if dir is None or prop is None: continue
def sortfun(a, b, sort=sort, group=group, properties=self.getprops(), db = self.db, cl=self): a_id, an = a b_id, bn = b # sort by group and then sort for dir, prop in group, sort: if dir is None or prop is None: continue
33,868
def sortfun(a, b, sort=sort, group=group, properties=self.getprops(), db = self.db, cl=self): a_id, an = a b_id, bn = b # sort by group and then sort for dir, prop in group, sort: if dir is None or prop is None: continue
def sortfun(a, b, sort=sort, group=group, properties=self.getprops(), db = self.db, cl=self): a_id, an = a b_id, bn = b # sort by group and then sort for dir, prop in group, sort: if dir is None or prop is None: continue
33,869
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,870
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,871
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,872
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,873
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,874
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,875
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,876
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
33,877
def __init__(self, db, classname, **properties): """The newly-created class automatically includes the "messages", "files", "nosy", and "superseder" properties. If the 'properties' dictionary attempts to specify any of these properties or a "creation" or "activity" property, a ValueError is raised.""" if not propertie...
def __init__(self, db, classname, **properties): """The newly-created class automatically includes the "messages", "files", "nosy", and "superseder" properties. If the 'properties' dictionary attempts to specify any of these properties or a "creation" or "activity" property, a ValueError is raised.""" if not propertie...
33,878
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,879
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): """) message - a Message instance
33,880
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,881
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,882
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,883
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,884
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,885
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,886
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,887
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,888
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,889
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,890
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,891
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,892
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,893
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,894
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,895
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,896
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,897
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,898
def handle_message(self, message): ''' message - a Message instance
def handle_message(self, message): ''' message - a Message instance
33,899