bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def keys(self): return self.form.keys():
def keys(self): return self.form.keys():
33,600
def do_export(self, args): ""'''Usage: export [class[,class]] export_dir Export the database to colon-separated-value files.
def do_export(self, args): ""'''Usage: export [class[,class]] export_dir Export the database to colon-separated-value files.
33,601
def do_import(self, args): ""'''Usage: import import_dir Import a database from the directory containing CSV files, two per class to import.
def do_import(self, args): ""'''Usage: import import_dir Import a database from the directory containing CSV files, two per class to import.
33,602
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...
def addjournal(self, tablenm, nodeid, action, params, creator=None, creation=None): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) if creator is None: creator = self.curuserid else: try: creator = int(creator) except TypeError: creator = int(self.getclass('user').lookup(...
33,603
def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [admin password [key=val[,key=val]]]]] Install a new Roundup tracker.
def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [key=val[,key=val]]]] Install a new Roundup tracker.
33,604
def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [admin password [key=val[,key=val]]]]] Install a new Roundup tracker.
def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [admin password [key=val[,key=val]]]]] Install a new Roundup tracker.
33,605
def handle(self): """Mangle some of the form variables.
def handle(self): """Mangle some of the form variables.
33,606
def handle(self): """Mangle some of the form variables.
def handle(self): """Mangle some of the form variables.
33,607
def handle(self): """Mangle some of the form variables.
def handle(self): """Mangle some of the form variables.
33,608
def handle(self): """Mangle some of the form variables.
def handle(self): """Mangle some of the form variables.
33,609
def newItemPermission(self, props): """Determine whether the user has permission to create this item.
def newItemPermission(self, props): """Determine whether the user has permission to create this item.
33,610
def registerAction(self): '''Attempt to create a new user based on the contents of the form and then set the cookie.
def registerAction(self): '''Attempt to create a new user based on the contents of the form and then set the cookie.
33,611
def editItemAction(self): ''' Perform an edit of an item in the database.
def editItemAction(self): ''' Perform an edit of an item in the database.
33,612
def newItemAction(self): ''' Add a new item to the database.
def newItemAction(self): ''' Add a new item to the database.
33,613
def lookupIds(db, prop, ids, num_re=re.compile('-?\d+')): cl = db.getclass(prop.classname) l = [] for entry in ids: if num_re.match(entry): l.append(entry) else: try: l.append(cl.lookup(entry)) except KeyError: # ignore invalid keys pass return l
def lookupIds(db, prop, ids, fail_ok=False, num_re=re.compile('-?\d+')): ''' "fail_ok" should be specified if we wish to pass through bad values (most likely form values that we wish to represent back to the user) ''' cl = db.getclass(prop.classname) l = [] for entry in ids: if num_re.match(entry): l.append(entry) else...
33,614
def lookupIds(db, prop, ids, num_re=re.compile('-?\d+')): cl = db.getclass(prop.classname) l = [] for entry in ids: if num_re.match(entry): l.append(entry) else: try: l.append(cl.lookup(entry)) except KeyError: # ignore invalid keys pass return l
def lookupIds(db, prop, ids, num_re=re.compile('-?\d+')): cl = db.getclass(prop.classname) l = [] for entry in ids: if num_re.match(entry): l.append(entry) else: try: l.append(cl.lookup(entry)) except KeyError: # ignore invalid keys pass return l
33,615
def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLClass.getitem', (self, item)
def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLClass.getitem', (self, item)
33,616
def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLClass.getitem', (self, item)
def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLClass.getitem', (self, item)
33,617
def testFollowup(self): self.doNewIssue()
def testFollowup(self): self.doNewIssue()
33,618
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,619
def handle_Message(self, message): '''Handle an RFC822 Message
def handle_Message(self, message): '''Handle an RFC822 Message
33,620
def handle_Message(self, message): '''Handle an RFC822 Message
def handle_Message(self, message): '''Handle an RFC822 Message
33,621
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...
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...
33,622
def handle(self, wcre=re.compile(r'[\s,]+')): """Mangle some of the form variables.
def handle(self, wcre=re.compile(r'[\s,]+')): """Mangle some of the form variables.
33,623
def setkey(self, propname): '''Select a String property of this class to be the key property.
def setkey(self, propname): '''Select a String property of this class to be the key property.
33,624
def setkey(self, propname): '''Select a String property of this class to be the key property.
def setkey(self, propname): '''Select a String property of this class to be the key property.
33,625
def setkey(self, propname): '''Select a String property of this class to be the key property.
def setkey(self, propname): '''Select a String property of this class to be the key property.
33,626
def setkey(self, propname): '''Select a String property of this class to be the key property.
def setkey(self, propname): '''Select a String property of this class to be the key property.
33,627
def setkey(self, propname): '''Select a String property of this class to be the key property.
def setkey(self, propname): '''Select a String property of this class to be the key property.
33,628
def setkey(self, propname): '''Select a String property of this class to be the key property.
def setkey(self, propname): '''Select a String property of this class to be the key property.
33,629
def getindexview(self, RW=0): # XXX FIX ME -> The RW flag doesn't do anything. return self.db._db.view("_%s" % self.classname).ordered(1)
def getindexview(self, RW=0): # XXX FIX ME -> The RW flag doesn't do anything. return self.db._db.view("_%s" % self.classname).ordered(1)
33,630
def classhelp(self, properties=None, label=''"(list)", width='500', height='400', property='', form='itemSynopsis', pagesize=50, inputtype="checkbox", sort=None, filter=None): '''Pop up a javascript window with class help
def classhelp(self, properties=None, label=''"(list)", width='500', height='400', property='', form='itemSynopsis', pagesize=50, inputtype="checkbox", sort=None, filter=None): '''Pop up a javascript window with class help
33,631
def generateChangeNote(self, nodeid, newvalues): """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, newvalues): """Generate a change note that lists property changes """ cn = self.classname cl = self.db.classes[cn] changed = {} props = cl.getprops(protected=0)
33,632
def list(self, sort=None, group=None, filter=None, columns=None, filterspec=None, show_customization=None, show_nodes=1, pagesize=None): ''' call the template index with the args
def list(self, sort=None, group=None, filter=None, columns=None, filterspec=None, show_customization=None, show_nodes=1, pagesize=None): ''' call the template index with the args
33,633
def list(self, sort=None, group=None, filter=None, columns=None, filterspec=None, show_customization=None, show_nodes=1, pagesize=None): ''' call the template index with the args
def list(self, sort=None, group=None, filter=None, columns=None, filterspec=None, show_customization=None, show_nodes=1, pagesize=None): ''' call the template index with the args
33,634
def html_quote(self, html): '''HTML-quote the supplied text.''' return cgi.escape(url)
def html_quote(self, html): '''HTML-quote the supplied text.''' return cgi.escape(url)
33,635
def post_init(self): """Called once the schema initialisation has finished. If 'refresh' is true, we want to rebuild the backend structures. """ raise NotImplementedError
def post_init(self): """Called once the schema initialisation has finished. If 'refresh' is true, we want to rebuild the backend structures. """ raise NotImplementedError
33,636
def storefile(self, classname, nodeid, property, content): '''Store the content of the file in the database. The property may be None, in which case the filename does not indicate which property is being saved. ''' raise NotImplementedError
def storefile(self, classname, nodeid, property, content): '''Store the content of the file in the database. The property may be None, in which case the filename does not indicate which property is being saved. ''' raise NotImplementedError
33,637
def rollback(self): ''' Reverse all actions from the current transaction.
def rollback(self): ''' Reverse all actions from the current transaction.
33,638
def create(self, **propvalues): """Create a new node of this class and return its id.
def create(self, **propvalues): """Create a new node of this class and return its id.
33,639
def create(self, **propvalues): """Create a new node of this class and return its id.
def create(self, **propvalues): """Create a new node of this class and return its id.
33,640
def create(self, **propvalues): """Create a new node of this class and return its id.
def create(self, **propvalues): """Create a new node of this class and return its id.
33,641
def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised.
def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised.
33,642
def retire(self, nodeid): """Retire a node. The properties on the node remain available from the get() method, and the node's id is never reused. Retired nodes are not returned by the find(), list(), or lookup() methods, and other nodes may reuse the values of their key properties. """ raise NotImplementedError
def retire(self, nodeid): """Retire a node. The properties on the node remain available from the get() method, and the node's id is never reused. Retired nodes are not returned by the find(), list(), or lookup() methods, and other nodes may reuse the values of their key properties. """ raise NotImplementedError
33,643
def retire(self, nodeid): """Retire a node. The properties on the node remain available from the get() method, and the node's id is never reused. Retired nodes are not returned by the find(), list(), or lookup() methods, and other nodes may reuse the values of their key properties. """ raise NotImplementedError
def retire(self, nodeid): """Retire a node. The properties on the node remain available from the get() method, and the node's id is never reused. Retired nodes are not returned by the find(), list(), or lookup() methods, and other nodes may reuse the values of their key properties. """ raise NotImplementedError
33,644
def restore(self, nodeid): '''Restpre a retired node.
def restore(self, nodeid): '''Restpre a retired node.
33,645
def destroy(self, nodeid): """Destroy a node. WARNING: this method should never be used except in extremely rare situations where there could never be links to the node being deleted
def destroy(self, nodeid): """Destroy a node. WARNING: this method should never be used except in extremely rare situations where there could never be links to the node being deleted
33,646
def find(self, **propspec): """Get the ids of nodes in this class which link to the given nodes.
def find(self, **propspec): """Get the ids of nodes in this class which link to the given nodes.
33,647
def get(self, name, default=None): if self.has_key(name): return self[name] else: return default
def get(self, name, default=None): if self.has_key(name): return self[name] else: return default
33,648
def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin') # clean age sessions self.clean_sessions() # make sure we have the session Class sessions = self.db.sessions
def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin') # clean age sessions self.clean_sessions() # make sure we have the session Class sessions = self.db.sessions
33,649
def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin') # clean age sessions self.clean_sessions() # make sure we have the session Class sessions = self.db.sessions
def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin') # clean age sessions self.clean_sessions() # make sure we have the session Class sessions = self.db.sessions
33,650
def set_cookie(self, user): ''' Set up a session cookie for the user and store away the user's login info against the session. ''' # TODO generate a much, much stronger session key ;) self.session = binascii.b2a_base64(repr(random.random())).strip()
def set_cookie(self, user): ''' Set up a session cookie for the user and store away the user's login info against the session. ''' # TODO generate a much, much stronger session key ;) self.session = binascii.b2a_base64(repr(random.random())).strip()
33,651
def logout_action(self): ''' Make us really anonymous - nuke the cookie too ''' # log us out self.make_user_anonymous()
def logout_action(self): ''' Make us really anonymous - nuke the cookie too ''' # log us out self.make_user_anonymous()
33,652
def do_history(self, direction='descending'): ''' list the history of the item
def do_history(self, direction='descending'): ''' list the history of the item
33,653
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
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
33,654
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
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
33,655
def _value2str(self, value): if value is None: return self.null_strings[0] else: return value
def _value2str(self, value): if value is None: return self.null_strings[0] else: return value
33,656
def linereader(file=file, lnum=[lnum]): line = linecache.getline(file, lnum[0]) lnum[0] = lnum[0] + 1 return line
def linereader(file=file, lnum=[lnum]): line = linecache.getline(file, lnum[0]) lnum[0] = lnum[0] + 1 return line
33,657
def find(self, **propspec): '''Get the ids of nodes in this class which link to the given nodes.
def find(self, **propspec): '''Get the ids of nodes in this class which link to the given nodes.
33,658
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''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
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''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
33,659
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''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
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''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
33,660
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''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
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''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
33,661
def get_standard_message(self, to, subject, author=None): '''Form a standard email message from Roundup.
def get_standard_message(self, to, subject, author=None): '''Form a standard email message from Roundup.
33,662
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): ''' Determine the context of this page from the URL:
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)'), mc=re.compile(r'(</?(.*?)>)')): ''' Determine the context of this page from the URL:
33,663
def __init__(self, db): ''' Initialise the permission and role classes, and add in the base roles (for admin user). ''' self.db = weakref.proxy(db) # use a weak ref to avoid circularity
def __init__(self, db): ''' Initialise the permission and role classes, and add in the base roles (for admin user). ''' self.db = weakref.proxy(db) # use a weak ref to avoid circularity
33,664
def addPermissionToRole(self, rolename, permission): ''' Add the permission to the role's permission list.
def addPermissionToRole(self, rolename, permission): ''' Add the permission to the role's permission list.
33,665
def send_message(self, nodeid, msgid, note, sendto, from_address=None, bcc_sendto=[]): '''Actually send the nominated message from this node to the sendto recipients, with the note appended. ''' users = self.db.user messages = self.db.msg files = self.db.file
def send_message(self, nodeid, msgid, note, sendto, from_address=None, bcc_sendto=[]): '''Actually send the nominated message from this node to the sendto recipients, with the note appended. ''' users = self.db.user messages = self.db.msg files = self.db.file
33,666
def send_message(self, nodeid, msgid, note, sendto, from_address=None, bcc_sendto=[]): '''Actually send the nominated message from this node to the sendto recipients, with the note appended. ''' users = self.db.user messages = self.db.msg files = self.db.file
def send_message(self, nodeid, msgid, note, sendto, from_address=None, bcc_sendto=[]): '''Actually send the nominated message from this node to the sendto recipients, with the note appended. ''' users = self.db.user messages = self.db.msg files = self.db.file
33,667
def sendEmail(self, to, subject, content): # send email to the user's email address message = StringIO.StringIO() writer = MimeWriter.MimeWriter(message) tracker_name = self.db.config.TRACKER_NAME writer.addheader('Subject', encode_header(subject)) writer.addheader('To', to) writer.addheader('From', roundupdb.straddr((...
def sendEmail(self, to, subject, content): # send email to the user's email address message = StringIO.StringIO() writer = MimeWriter.MimeWriter(message) tracker_name = self.db.config.TRACKER_NAME writer.addheader('Subject', encode_header(subject)) writer.addheader('To', to) writer.addheader('From', roundupdb.straddr((...
33,668
def confRegoAction(self): ''' Grab the OTK, use it to load up the new user details ''' # pull the rego information out of the otk database otk = self.form['otk'].value props = self.db.otks.getall(otk) for propname, proptype in self.db.user.getprops().items(): value = props.get(propname, None) if value is None: pass eli...
def confRegoAction(self): ''' Grab the OTK, use it to load up the new user details ''' # pull the rego information out of the otk database otk = self.form['otk'].value props = self.db.otks.getall(otk) for propname, proptype in self.db.user.getprops().items(): value = props.get(propname, None) if value is None: pass eli...
33,669
def chatty(db, cl, nodeid, newvalues): ''' If the issue is currently 'unread', 'resolved' or 'done-cbb', then set it to 'chatting' ''' # don't fire if there's no new message (ie. chat) if not newvalues.has_key('messages'): return if newvalues['messages'] == cl.get(nodeid, 'messages'): return # get the chatting state I...
def chatty(db, cl, nodeid, newvalues): ''' If the issue is currently 'unread', 'resolved', 'done-cbb' or None, then set it to 'chatting' ''' # don't fire if there's no new message (ie. chat) if not newvalues.has_key('messages'): return if newvalues['messages'] == cl.get(nodeid, 'messages'): return # get the chatting s...
33,670
def chatty(db, cl, nodeid, newvalues): ''' If the issue is currently 'unread', 'resolved' or 'done-cbb', then set it to 'chatting' ''' # don't fire if there's no new message (ie. chat) if not newvalues.has_key('messages'): return if newvalues['messages'] == cl.get(nodeid, 'messages'): return # get the chatting state I...
def chatty(db, cl, nodeid, newvalues): ''' If the issue is currently 'unread', 'resolved' or 'done-cbb', then set it to 'chatting' ''' # don't fire if there's no new message (ie. chat) if not newvalues.has_key('messages'): return if newvalues['messages'] == cl.get(nodeid, 'messages'): return # get the chatting state I...
33,671
def __init__(self, config):
def __init__(self, config):
33,672
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<a>\d\d?)[/-](?P<b>\d\d?))? # or mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d(\.\d+)?))?)? # hh:mm:ss (?P<o>.+)? ...
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<a>\d\d?)[/-](?P<b>\d\d?))? # or mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d(\.\d+)?))?)? # hh:mm:ss (?P<o>.+)? ...
33,673
def serialise(self): return '%4d%02d%02d%02d%02d%02d'%(self.year, self.month, self.day, self.hour, self.minute, self.second)
def serialise(self): return '%4d%02d%02d%02d%02d%f'%(self.year, self.month, self.day, self.hour, self.minute, self.second)
33,674
def labelprop(self): return 'key'
def labelprop(self, default_to_id=0): return 'key'
33,675
def set_cookie(self, user, password): # construct the cookie user = binascii.b2a_base64('%s:%s'%(user, password)).strip() expire = Cookie._getdate(86400*365) path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'])) self.header({'Set-Cookie': 'roundup_user="%s"; expires="%s"; Path="%s";' % ( user, expire, p...
def set_cookie(self, user, password): # construct the cookie user = binascii.b2a_base64('%s:%s'%(user, password)).strip() expire = Cookie._getdate(86400*365) path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'])) self.header({'Set-Cookie': 'roundup_user=%s; expires=%s; Path=%s;' % ( user, expire, path)})
33,676
def logout(self, message=None): self.make_user_anonymous() # construct the logout cookie now = Cookie._getdate() path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'])) self.header({'Set-Cookie': 'roundup_user=deleted; Max-Age=0; expires="%s"; Path="%s";'%(now, path)}) return self.login()
def logout(self, message=None): self.make_user_anonymous() # construct the logout cookie now = Cookie._getdate() path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'])) self.header({'Set-Cookie': 'roundup_user=deleted; Max-Age=0; expires=%s; Path=%s;'%(now, path)}) return self.login()
33,677
def export_journals(self): '''Export a class's journal - generate a list of lists of CSV-able data:
def export_journals(self): '''Export a class's journal - generate a list of lists of CSV-able data:
33,678
def testReldate_date(self): self.assertEqual(self.tf.do_reldate('date'), '- 2y 1m') self.assertEqual(self.tf.do_reldate('date', pretty=1), ' 1 January 2000')
def testReldate_date(self): self.assertEqual(self.tf.do_reldate('date'), '- 2y 1m') self.assertEqual(self.tf.do_reldate('date', pretty=1), ' 1 January 2000')
33,679
def filteringSetup(self): for user in ( {'username': 'bleep', 'age': 1}, {'username': 'blop', 'age': 1.5}, {'username': 'blorp', 'age': 2}): self.db.user.create(**user) iss = self.db.issue for issue in ( {'title': 'issue one', 'status': '2', 'assignedto': '1', 'foo': date.Interval('1:10'), 'priority': '3', 'deadline': ...
def filteringSetup(self): for user in ( {'username': 'bleep', 'age': 1}, {'username': 'blop', 'age': 1.5}, {'username': 'blorp', 'age': 2}): self.db.user.create(**user) iss = self.db.issue for issue in ( {'title': 'issue one', 'status': '2', 'assignedto': '1', 'foo': date.Interval('1:10'), 'priority': '3', 'deadline': ...
33,680
def filteringSetup(self): for user in ( {'username': 'bleep', 'age': 1}, {'username': 'blop', 'age': 1.5}, {'username': 'blorp', 'age': 2}): self.db.user.create(**user) iss = self.db.issue for issue in ( {'title': 'issue one', 'status': '2', 'assignedto': '1', 'foo': date.Interval('1:10'), 'priority': '3', 'deadline': ...
def filteringSetup(self): for user in ( {'username': 'bleep', 'age': 1}, {'username': 'blop', 'age': 1.5}, {'username': 'blorp', 'age': 2}): self.db.user.create(**user) iss = self.db.issue for issue in ( {'title': 'issue one', 'status': '2', 'assignedto': '1', 'foo': date.Interval('1:10'), 'priority': '3', 'deadline': ...
33,681
def run_demo(home): """Run the demo tracker installed in ``home``""" roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home} cfg = configuration.CoreConfig(home) success_message = '''Server running - connect to: %s
def run_demo(home): """Run the demo tracker installed in ``home``""" roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home} cfg = configuration.CoreConfig(home) success_message = '''Server running - connect to: %s
33,682
def run_demo(home): """Run the demo tracker installed in ``home``""" roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home} cfg = configuration.CoreConfig(home) success_message = '''Server running - connect to: %s
def run_demo(home): """Run the demo tracker installed in ``home``""" roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home} cfg = configuration.CoreConfig(home) success_message = '''Server running - connect to: %s
33,683
def __init__(self, client, classname, nodeid, prop, name, value, anonymous=0): HTMLProperty.__init__(self, client, classname, nodeid, prop, name, value, anonymous) if self._value: self._value.setTranslator(self._client.translator)
def __init__(self, client, classname, nodeid, prop, name, value, anonymous=0): HTMLProperty.__init__(self, client, classname, nodeid, prop, name, value, anonymous) if self._value and not isinstance(self._value, (str, unicode)): self._value.setTranslator(self._client.translator)
33,684
def inner_main(self): ''' Process a request.
def inner_main(self): ''' Process a request.
33,685
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): """ Determine the context of this page from the URL:
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): """ Determine the context of this page from the URL:
33,686
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)
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)
33,687
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)
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)
33,688
def renderContext(self): ''' Return a PageTemplate for the named page ''' name = self.classname extension = self.template pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
def renderContext(self): ''' Return a PageTemplate for the named page ''' name = self.classname extension = self.template pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
33,689
def renderContext(self): ''' Return a PageTemplate for the named page ''' name = self.classname extension = self.template pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
def renderContext(self): ''' Return a PageTemplate for the named page ''' name = self.classname extension = self.template pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
33,690
def searchAction(self, wcre=re.compile(r'[\s,]+')): ''' Mangle some of the form variables.
def searchAction(self, wcre=re.compile(r'[\s,]+')): ''' Mangle some of the form variables.
33,691
def error(): exc_type, exc_value = sys.exc_info()[:2] return _('Error: %s: %s' % (exc_type, exc_value))
def error(): exc_type, exc_value = sys.exc_info()[:2] return _('Error: %s: %s' % (exc_type, exc_value))
33,692
def __init__(self, args): # redirect stdout/stderr to our logfile if LOGFILE: # appending, unbuffered sys.stdout = sys.stderr = open(LOGFILE, 'a', 0) win32serviceutil.ServiceFramework.__init__(self, args) RoundupHTTPServer.__init__(self, self.address, RoundupRequestHandler)
def __init__(self, args): # redirect stdout/stderr to our logfile if LOGFILE: # appending, unbuffered sys.stdout = sys.stderr = open(LOGFILE, 'a', 0) win32serviceutil.ServiceFramework.__init__(self, args) BaseHTTPServer.HTTPServer.__init__(self, self.address, RoundupRequestHandler)
33,693
def usage(message=''): if RoundupService: win = ''' -c: Windows Service options. If you want to run the server as a Windows Service, you must configure the rest of the options by changing the constants of this program. You will at least configure one tracker in the TRACKER_HOMES variable. This option is mutually exc...
def usage(message=''): if RoundupService: win = ''' -c: Windows Service options. If you want to run the server as a Windows Service, you must configure the rest of the options by changing the constants of this program. You will at least configure one tracker in the TRACKER_HOMES variable. This option is mutually exc...
33,694
def run(port=PORT, success_message=None): ''' Script entry point - handle args and figure out what to to. ''' # time out after a minute if we can import socket if hasattr(socket, 'setdefaulttimeout'): socket.setdefaulttimeout(60) hostname = HOSTNAME pidfile = PIDFILE logfile = LOGFILE user = ROUNDUP_USER group = ROUND...
def run(port=PORT, success_message=None): ''' Script entry point - handle args and figure out what to to. ''' # time out after a minute if we can import socket if hasattr(socket, 'setdefaulttimeout'): socket.setdefaulttimeout(60) hostname = HOSTNAME pidfile = PIDFILE logfile = LOGFILE user = ROUNDUP_USER group = ROUND...
33,695
def __repr__(self): return '<Permission 0x%x %r,%r,%r,%r>'%(id(self), self.name, self.klass, self.property, self.check)
def __repr__(self): return '<Permission 0x%x %r,%r,%r,%r>'%(id(self), self.name, self.klass, self.property, self.check)
33,696
def addPermissionToRole(self, rolename, permission, classname=None): ''' Add the permission to the role's permission list.
def addPermissionToRole(self, rolename, permission, classname=None): ''' Add the permission to the role's permission list.
33,697
def login(self, message=None): self.pagehead('Login to roundup', message) self.write('''
def login(self, message=None, newuser_form=None): self.pagehead('Login to roundup', message) self.write('''
33,698
def login(self, message=None): self.pagehead('Login to roundup', message) self.write('''
def login(self, message=None): self.pagehead('Login to roundup', message) self.write('''
33,699