rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
</table>'''%cgi.escape(''.join(traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)))) | </table>''' % (_('Full traceback:'), cgi.escape(''.join( traceback.format_exception(*sys.exc_info()) )))) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
def html(context=5): | def html(context=5, i18n=None): _ = get_translator(i18n) | def html(context=5): etype, evalue = sys.exc_type, sys.exc_value if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + string.split(sys.version)[0] + '<br>' + sys.executable head = pydoc.html.heading( '<font size=+1><strong>%s</strong>: %s</font>'%(etype, evalue), '#ffffff', '#777777', pyver) h... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
'<font size=+1><strong>%s</strong>: %s</font>'%(etype, evalue), | _('<font size=+1><strong>%(exc_type)s</strong>: %(exc_value)s</font>') % {'exc_type': etype, 'exc_value': evalue}, | def html(context=5): etype, evalue = sys.exc_type, sys.exc_value if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + string.split(sys.version)[0] + '<br>' + sys.executable head = pydoc.html.heading( '<font size=+1><strong>%s</strong>: %s</font>'%(etype, evalue), '#ffffff', '#777777', pyver) h... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
link = '''<file is None - probably inside <tt>eval</tt> or <tt>exec</tt>>''' | link = _("<file is None - probably inside <tt>eval</tt> " "or <tt>exec</tt>>") | def html(context=5): etype, evalue = sys.exc_type, sys.exc_value if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + string.split(sys.version)[0] + '<br>' + sys.executable head = pydoc.html.heading( '<font size=+1><strong>%s</strong>: %s</font>'%(etype, evalue), '#ffffff', '#777777', pyver) h... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
call = 'in <strong>%s</strong>' % func + inspect.formatargvalues( | call = _('in <strong>%s</strong>') % func + inspect.formatargvalues( | def html(context=5): etype, evalue = sys.exc_type, sys.exc_value if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + string.split(sys.version)[0] + '<br>' + sys.executable head = pydoc.html.heading( '<font size=+1><strong>%s</strong>: %s</font>'%(etype, evalue), '#ffffff', '#777777', pyver) h... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
if not os.getuid(): | if os.getuid(): | def setgid(group): if group is None: return if not hasattr(os, 'setgid'): return # if root, setgid to the running user if not os.getuid(): print _('WARNING: ignoring "-g" argument, not root') return try: import grp except ImportError: raise ValueError, _("Can't change groups - no grp module") try: try: gid = int(grou... | d9d5c757c46b4e9f4b621275626643ca5ae62a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d9d5c757c46b4e9f4b621275626643ca5ae62a6a/roundup_server.py |
v = int(value) | v = float(value) | def set_inner(self, nodeid, **propvalues): '''Called outside of auditors''' isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] | 6c0272730e912ec3bee2ac717f2658a1a4d45d30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6c0272730e912ec3bee2ac717f2658a1a4d45d30/back_metakit.py |
where[propname] = int(value) | if type(value) is _LISTTYPE: orcriteria[propname] = [float(v) for v in value] else: where[propname] = float(value) | 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 | 6c0272730e912ec3bee2ac717f2658a1a4d45d30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6c0272730e912ec3bee2ac717f2658a1a4d45d30/back_metakit.py |
value = int(value) | value = float(value) | 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. | 6c0272730e912ec3bee2ac717f2658a1a4d45d30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6c0272730e912ec3bee2ac717f2658a1a4d45d30/back_metakit.py |
hyperdb.Number : 'I', | hyperdb.Number : 'D', | def getNumber(number): if number == 0: res = None elif number < 0: res = number else: res = number - 1 return res | 6c0272730e912ec3bee2ac717f2658a1a4d45d30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6c0272730e912ec3bee2ac717f2658a1a4d45d30/back_metakit.py |
def listTemplates(self): ''' List all the available templates. | 740b711f4df0ecbf82b5c34099da07dcff7135e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/740b711f4df0ecbf82b5c34099da07dcff7135e0/admin.py | ||
path = __file__ for i in range(5): path = os.path.dirname(path) tdir = os.path.join(path, 'share', 'roundup', 'templates') if os.path.isdir(tdir): templates = listTemplates(tdir) else: templates = {} | templates = {} for N in 4, 5: path = __file__ for i in range(N): path = os.path.dirname(path) tdir = os.path.join(path, 'share', 'roundup', 'templates') if os.path.isdir(tdir): templates = listTemplates(tdir) break | def listTemplates(self): ''' List all the available templates. | 740b711f4df0ecbf82b5c34099da07dcff7135e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/740b711f4df0ecbf82b5c34099da07dcff7135e0/admin.py |
if tracker_home is not None: | if tracker_home is None: tracker_locale = None else: | def get_translation(language=None, tracker_home=None, translation_class=RoundupTranslations, null_translation_class=RoundupNullTranslations | 1cb2350fddb300d8c45113d8cf5fc38a0f72dba9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1cb2350fddb300d8c45113d8cf5fc38a0f72dba9/i18n.py |
else: tracker_locale = None | def get_translation(language=None, tracker_home=None, translation_class=RoundupTranslations, null_translation_class=RoundupNullTranslations | 1cb2350fddb300d8c45113d8cf5fc38a0f72dba9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1cb2350fddb300d8c45113d8cf5fc38a0f72dba9/i18n.py | |
for mofile in mofiles: | for mofile in mofiles[1:]: | def get_translation(language=None, tracker_home=None, translation_class=RoundupTranslations, null_translation_class=RoundupNullTranslations | 1cb2350fddb300d8c45113d8cf5fc38a0f72dba9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1cb2350fddb300d8c45113d8cf5fc38a0f72dba9/i18n.py |
user = 'anonymous' | def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin') | 0710671c21d869127ea20f6bf44a5db77ea7a994 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0710671c21d869127ea20f6bf44a5db77ea7a994/client.py | |
_svc_name_ = "Roundup Bug Tracker" | _svc_name_ = "roundup" | 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... | 998279a3d7de2ef06b98d35b2649de3fe4a0d156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/998279a3d7de2ef06b98d35b2649de3fe4a0d156/roundup_server.py |
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 exclusive from the rest. Typing "roundup-server -c help" shows Windows Services | must use configuration file to specify tracker homes. Logfile option is required to run Roundup Tracker service. Typing "roundup-server -c help" shows Windows Services | def usage(message=''): if RoundupService: os_part = \ | 998279a3d7de2ef06b98d35b2649de3fe4a0d156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/998279a3d7de2ef06b98d35b2649de3fe4a0d156/roundup_server.py |
-v prints the Roundup version number and exits -C <fname> use configuration file -n <name> sets the host name of the Roundup web server instance -p <port> sets the port to listen on (default: %(port)s) | -v print the Roundup version number and exit -h print this text and exit -S create or update configuration file and exit -C <fname> use configuration file <fname> -n <name> set the host name of the Roundup web server instance -p <port> set the port to listen on (default: %(po... | def usage(message=''): if RoundupService: os_part = \ | 998279a3d7de2ef06b98d35b2649de3fe4a0d156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/998279a3d7de2ef06b98d35b2649de3fe4a0d156/roundup_server.py |
support=/var/spool/roundup-trackers/support | support=/var/spool/roundup-trackers/support | def usage(message=''): if RoundupService: os_part = \ | 998279a3d7de2ef06b98d35b2649de3fe4a0d156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/998279a3d7de2ef06b98d35b2649de3fe4a0d156/roundup_server.py |
See the "admin_guide" in the Roundup "doc" directory. | Roundup Server configuration file has common .ini file format. Configuration file created with 'roundup-server -S' contains detailed explanations for each option. Please see that file for option descriptions. | def usage(message=''): if RoundupService: os_part = \ | 998279a3d7de2ef06b98d35b2649de3fe4a0d156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/998279a3d7de2ef06b98d35b2649de3fe4a0d156/roundup_server.py |
short_options = "c:C:" | short_options = "cC:" | def run(port=undefined, success_message=None): ''' Script entry point - handle args and figure out what to to. ''' # time out after a minute if we can if hasattr(socket, 'setdefaulttimeout'): socket.setdefaulttimeout(60) config = ServerConfig() # additional options short_options = "hvS" if RoundupService: short_option... | 998279a3d7de2ef06b98d35b2649de3fe4a0d156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/998279a3d7de2ef06b98d35b2649de3fe4a0d156/roundup_server.py |
v = str(self.form[k].value) self.write('<dd><em>%s</em>:%s</dd>'%(k, cgi.escape(v))) | v = self.form.getvalue(k, "<empty>") if type(v) is type([]): v = "|".join(v) self.write('<dd><em>%s</em>=%s</dd>'%(k, cgi.escape(v))) keys = self.headers_sent.keys() keys.sort() self.write('<dt><b>Sent these HTTP headers</b></dt>') for k in keys: v = self.headers_sent[k] self.write('<dd><em>%s</em>=%s</dd>'%(k, cgi.es... | def pagefoot(self): if self.debug: self.write('<hr><small><dl>') self.write('<dt><b>Path</b></dt>') self.write('<dd>%s</dd>'%(', '.join(map(repr, self.split_path)))) keys = self.form.keys() keys.sort() if keys: self.write('<dt><b>Form entries</b></dt>') for k in self.form.keys(): v = str(self.form[k].value) self.write(... | e7be78766d1d1e1e549184468ed3a2edb769c253 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e7be78766d1d1e1e549184468ed3a2edb769c253/cgi_client.py |
self.write('<dd><em>%s</em>:%s</dd>'%(k, cgi.escape(v))) | self.write('<dd><em>%s</em>=%s</dd>'%(k, cgi.escape(v))) | def pagefoot(self): if self.debug: self.write('<hr><small><dl>') self.write('<dt><b>Path</b></dt>') self.write('<dd>%s</dd>'%(', '.join(map(repr, self.split_path)))) keys = self.form.keys() keys.sort() if keys: self.write('<dt><b>Form entries</b></dt>') for k in self.form.keys(): v = str(self.form[k].value) self.write(... | e7be78766d1d1e1e549184468ed3a2edb769c253 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e7be78766d1d1e1e549184468ed3a2edb769c253/cgi_client.py |
self.header({'Set-Cookie': 'roundup_user="%s"; Path="%s";'%(user, path)}) | self.header({'Set-Cookie': 'roundup_user="%s"; expires="%s"; Path="%s";' % ( user, expire, path)}) | def set_cookie(self, user, password): # construct the cookie user = binascii.b2a_base64('%s:%s'%(user, password)).strip() path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'])) self.header({'Set-Cookie': 'roundup_user="%s"; Path="%s";'%(user, path)}) | e7be78766d1d1e1e549184468ed3a2edb769c253 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e7be78766d1d1e1e549184468ed3a2edb769c253/cgi_client.py |
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: l.append(cl.lookup(entry)) return l | def classes(self): l = self._client.db.classes.keys() l.sort() return [HTMLClass(self._client, cn) for cn in l] | 370063bf9ffd54524059825f9b4d68c3a8b73df4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/370063bf9ffd54524059825f9b4d68c3a8b73df4/templating.py | |
if isinstance(prop, hyperdb.Multilink): value = [] | if not isinstance(prop, klass): continue if form.has_key(item): if isinstance(prop, hyperdb.Multilink): value = lookupIds(self._db, prop, handleListCGIValue(form[item])) elif isinstance(prop, hyperdb.Link): value = form[item].value.strip() if value: value = lookupIds(self._db, prop, [value])[0] else: value = None else:... | def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLClass.getitem', (self, item) | 370063bf9ffd54524059825f9b4d68c3a8b73df4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/370063bf9ffd54524059825f9b4d68c3a8b73df4/templating.py |
value = None if isinstance(prop, klass): return htmlklass(self._client, '', prop, item, value) | if isinstance(prop, hyperdb.Multilink): value = [] else: value = None print (prop, value) return htmlklass(self._client, '', prop, item, value) | def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLClass.getitem', (self, item) | 370063bf9ffd54524059825f9b4d68c3a8b73df4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/370063bf9ffd54524059825f9b4d68c3a8b73df4/templating.py |
return value.value.split(',') | value = value.value.strip() if not value: return [] return value.split(',') | def handleListCGIValue(value): ''' Value is either a single item or a list of items. Each item has a .value that we're actually interested in. ''' if isinstance(value, type([])): return [value.value for value in value] else: return value.value.split(',') | 370063bf9ffd54524059825f9b4d68c3a8b73df4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/370063bf9ffd54524059825f9b4d68c3a8b73df4/templating.py |
3. Re-start the server by running "python demo.py" again. 4. Re-initialise the server by running "python demo.py nuke". | 3. Re-start the server by running "roundup-demo" again. 4. Re-initialise the server by running "roundup-demo nuke". | def run_demo(home): """Run the demo tracker installed in ``home``""" cfg = configuration.CoreConfig(home) url = cfg["TRACKER_WEB"] hostname, port = urlparse.urlparse(url)[1].split(':') port = int(port) success_message = '''Server running - connect to: %s | cf5feebd4c810b35551ac2a024de2b944e739681 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf5feebd4c810b35551ac2a024de2b944e739681/demo.py |
print (self, value, self._value) | def __contains__(self, value): ''' Support the "in" operator. We have to make sure the passed-in value is a string first, not a HTMLProperty. ''' print (self, value, self._value) return str(value) in self._value | eb9435030b9ed926ec168d7662e43ed10cd4fd19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb9435030b9ed926ec168d7662e43ed10cd4fd19/templating.py | |
(direction, property) where direction is '+' or '-'. | (direction, property) where direction is '+' or '-'. A single string with the direction prepended may be used. For example: ('-', 'order'), '+name'. | def menu(self, size=None, height=None, showid=0, additional=[], sort_on=None, **conditions): ''' Render a form select list for this property | 35ec49ae42df96c75af99be5cb81144aeac348bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/35ec49ae42df96c75af99be5cb81144aeac348bf/templating.py |
if linkcl.getprops().has_key('order'): | if sort_on is not None: if not isinstance(sort_on, tuple): if sort_on[0] in '+-': sort_on = (sort_on[0], sort_on[1:]) else: sort_on = ('+', sort_on) elif linkcl.getprops().has_key('order'): | def menu(self, size=None, height=None, showid=0, additional=[], sort_on=None, **conditions): ''' Render a form select list for this property | 35ec49ae42df96c75af99be5cb81144aeac348bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/35ec49ae42df96c75af99be5cb81144aeac348bf/templating.py |
if sort_on is None: sort_on = ('+', linkcl.labelprop()) else: sort_on = ('+', sort_on) | sort_on = ('+', linkcl.labelprop()) | def menu(self, size=None, height=None, showid=0, additional=[], sort_on=None, **conditions): ''' Render a form select list for this property | 35ec49ae42df96c75af99be5cb81144aeac348bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/35ec49ae42df96c75af99be5cb81144aeac348bf/templating.py |
self.serve_file(designator) | try: self.serve_file(designator) except NotModified: self.request.send_response(304) self.request.end_headers() | def inner_main(self): '''Process a request. | b662bbdadc1a28b77b39bc165473070cc991f90c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b662bbdadc1a28b77b39bc165473070cc991f90c/client.py |
class Class: | class Class: | def getWriteAccess(self): if self.journaltag is not None and self.__RW == 0: #now = time.time #start = now() self._db = None #print "closing the file took %2.2f secs" % (now()-start) #start = now() self._db = metakit.storage(self.dbnm, 1) self.__RW = 1 self.hist = self._db.view('history') self.tables = self._db.view('t... | 1e5a27e65c0f84cfde772c520cd4227c6624919f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1e5a27e65c0f84cfde772c520cd4227c6624919f/back_metakit.py |
if not row.activity: | if not propvalues.has_key('activity'): | def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not propvalues: return if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise DatabaseError, 'Database open read-only' view = self.getview(1) # node must ex... | 1e5a27e65c0f84cfde772c520cd4227c6624919f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1e5a27e65c0f84cfde772c520cd4227c6624919f/back_metakit.py |
def ff(row, r=regexes): for propname, regex in r.items(): val = getattr(row, propname) if not regex.search(val): return 0 return 1 | 1e5a27e65c0f84cfde772c520cd4227c6624919f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1e5a27e65c0f84cfde772c520cd4227c6624919f/back_metakit.py | ||
v = v.sortrev(sortspec, rev)[:] | v = v.sortrev(sortspec, rev)[:] | def ff(row, r=regexes): for propname, regex in r.items(): val = getattr(row, propname) if not regex.search(val): return 0 return 1 | 1e5a27e65c0f84cfde772c520cd4227c6624919f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1e5a27e65c0f84cfde772c520cd4227c6624919f/back_metakit.py |
m = cStringIO.StringIO() w = MimeWriter.MimeWriter(m) content_type = 'text/plain' | part = writer.nextpart() part.addheader('Content-Disposition','attachment') part.addheader('Content-Description','Message you sent') body = part.startbody('text/plain') | def bounce_message(self, message, sendto, error, subject='Failed issue tracker submission'): ''' create a message that explains the reason for the failed issue submission to the author and attach the original message. ''' msg = cStringIO.StringIO() writer = MimeWriter.MimeWriter(msg) writer.addheader('Subject', subject... | 5fca8360911c2e4ba388f276e0b7f281dc3695b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5fca8360911c2e4ba388f276e0b7f281dc3695b1/mailgw.py |
header_name = header.split(':')[0] if header_name.lower() == 'content-type': content_type = message.getheader(header_name) elif message.getheader(header_name): w.addheader(header_name, message.getheader(header_name)) body = w.startbody(content_type) | body.write(header) body.write('\n') | def bounce_message(self, message, sendto, error, subject='Failed issue tracker submission'): ''' create a message that explains the reason for the failed issue submission to the author and attach the original message. ''' msg = cStringIO.StringIO() writer = MimeWriter.MimeWriter(msg) writer.addheader('Subject', subject... | 5fca8360911c2e4ba388f276e0b7f281dc3695b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5fca8360911c2e4ba388f276e0b7f281dc3695b1/mailgw.py |
part = writer.nextpart() part.addheader('Content-Disposition','attachment') part.addheader('Content-Description','Message you sent') part.addheader('Content-Transfer-Encoding', '7bit') body = part.startbody('message/rfc822') body.write(m.getvalue()) | def bounce_message(self, message, sendto, error, subject='Failed issue tracker submission'): ''' create a message that explains the reason for the failed issue submission to the author and attach the original message. ''' msg = cStringIO.StringIO() writer = MimeWriter.MimeWriter(msg) writer.addheader('Subject', subject... | 5fca8360911c2e4ba388f276e0b7f281dc3695b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5fca8360911c2e4ba388f276e0b7f281dc3695b1/mailgw.py | |
def assertRaisesMessage(self, exception, callable, message, *args, **kwargs): | _nocheck = "don't compare exception values (the exception is enough)" def assertRaisesMessage(self, exception, callable, message, *args, **kwargs): | def assertRaisesMessage(self, exception, callable, message, *args, **kwargs): try: callable(*args, **kwargs) except exception, msg: self.assertEqual(str(msg), message) else: if hasattr(excClass,'__name__'): excName = excClass.__name__ else: excName = str(excClass) raise self.failureException, excName | 1ea88748963503c94615f53ae26300832b1b51e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1ea88748963503c94615f53ae26300832b1b51e1/test_actions.py |
if hasattr(excClass,'__name__'): excName = excClass.__name__ else: excName = str(excClass) | if hasattr(excClass,'__name__'): excName = excClass.__name__ else: excName = str(excClass) | def assertRaisesMessage(self, exception, callable, message, *args, **kwargs): try: callable(*args, **kwargs) except exception, msg: self.assertEqual(str(msg), message) else: if hasattr(excClass,'__name__'): excName = excClass.__name__ else: excName = str(excClass) raise self.failureException, excName | 1ea88748963503c94615f53ae26300832b1b51e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1ea88748963503c94615f53ae26300832b1b51e1/test_actions.py |
self.assertRaisesMessage(Redirect, action.handle, 'BASE/issue') | self.assertRaisesMessage(SeriousError, action.handle, self._nocheck) | def testShowAction(self): self.client.db.config.TRACKER_WEB = 'BASE/' | 1ea88748963503c94615f53ae26300832b1b51e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1ea88748963503c94615f53ae26300832b1b51e1/test_actions.py |
option = linkcl.get(optionid, k) | option = linkcl.get(optionid, k) or '' | def field(self, showid=0, size=None): ''' Render a form edit field for the property ''' linkcl = self._db.getclass(self._prop.classname) if linkcl.getprops().has_key('order'): sort_on = 'order' else: sort_on = linkcl.labelprop() options = linkcl.filter(None, {}, ('+', sort_on), (None, None)) # TODO: make this a field d... | 1c48136eafda745b9d5d5f52896567de92958e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1c48136eafda745b9d5d5f52896567de92958e94/templating.py |
option = linkcl.get(optionid, k) | option = linkcl.get(optionid, k) or '' | def menu(self, size=None, height=None, showid=0, additional=[], **conditions): ''' Render a form select list for this property ''' value = self._value | 1c48136eafda745b9d5d5f52896567de92958e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1c48136eafda745b9d5d5f52896567de92958e94/templating.py |
option = linkcl.get(optionid, k) | option = linkcl.get(optionid, k) or '' | def menu(self, size=None, height=None, showid=0, additional=[], **conditions): ''' Render a form select list for this property ''' value = self._value | 1c48136eafda745b9d5d5f52896567de92958e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1c48136eafda745b9d5d5f52896567de92958e94/templating.py |
url: %(url)r | def __str__(self): d = {} d.update(self.__dict__) f = '' for k in self.form.keys(): f += '\n %r=%r'%(k,handleListCGIValue(self.form[k])) d['form'] = f e = '' for k,v in self.env.items(): e += '\n %r=%r'%(k, v) d['env'] = e return ''' | 1c48136eafda745b9d5d5f52896567de92958e94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1c48136eafda745b9d5d5f52896567de92958e94/templating.py | |
raise NotImplementedError | for name in 'creation activity creator actor'.split(): if properties.has_key(name): raise ValueError, '"creation", "activity", "creator" and '\ '"actor" are reserved' self.classname = classname self.properties = properties self.db = weakref.proxy(db) self.key = '' self.do_journal = 1 db.addclass(self) actions = "... | def __init__(self, db, classname, **properties): """Create a new class with a given name and property specification. | 9dab55a26b9a94cee652e7d264926fc1aeb57dfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9dab55a26b9a94cee652e7d264926fc1aeb57dfc/hyperdb.py |
This method computes the property for sorting. | This method computes the property for sorting. | def orderprop (self): """Return the property name to use for sorting for the given node. | 9dab55a26b9a94cee652e7d264926fc1aeb57dfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9dab55a26b9a94cee652e7d264926fc1aeb57dfc/hyperdb.py |
'''Add (or refresh) the node to search indexes ''' raise NotImplementedError | """Add (or refresh) the node to search indexes""" raise NotImplementedError def audit(self, event, detector, priority = 100): """Register an auditor detector""" self.auditors[event].append((priority, detector)) def fireAuditors(self, event, nodeid, newvalues): """Fire all registered auditors""" for prio, audit in ... | def index(self, nodeid): '''Add (or refresh) the node to search indexes ''' raise NotImplementedError | 9dab55a26b9a94cee652e7d264926fc1aeb57dfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9dab55a26b9a94cee652e7d264926fc1aeb57dfc/hyperdb.py |
'''List the property names for export from this Class.''' | """List the property names for export from this Class""" | def export_propnames(self): '''List the property names for export from this Class.''' propnames = self.getprops().keys() propnames.sort() return propnames | 9dab55a26b9a94cee652e7d264926fc1aeb57dfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9dab55a26b9a94cee652e7d264926fc1aeb57dfc/hyperdb.py |
shutil.copyfile(source, dest) | shutil.copyfile(source, dest) | def export_files(self, dirname, nodeid): ''' Export the "content" property as a file, not csv column ''' source = self.db.filename(self.classname, nodeid) | 9dab55a26b9a94cee652e7d264926fc1aeb57dfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9dab55a26b9a94cee652e7d264926fc1aeb57dfc/hyperdb.py |
libdir = os.path.join(tracker_home, 'lib') if os.path.isdir(libdir): sys.path.insert(1, libdir) | def __init__(self, tracker_home, optimize=0): """New-style tracker instance constructor | ec63b7e73dd33e0888d98e7541f0424a2475a331 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ec63b7e73dd33e0888d98e7541f0424a2475a331/instance.py | |
del sys.path[1] | sys.path.remove(dirpath) | def get_extensions(self, dirname): """Load python extensions | ec63b7e73dd33e0888d98e7541f0424a2475a331 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ec63b7e73dd33e0888d98e7541f0424a2475a331/instance.py |
return _('[hidden]') | return self._('[hidden]') | def history(self): if not self.is_view_ok(): return _('[hidden]') return self._('New node - no history') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def history(self, direction='descending', dre=re.compile('^\d+$')): if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def plain(self, escape=0, hyperlink=0): '''Render a "plain" representation of the property | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def stext(self, escape=0): ''' Render the value of the property as StructuredText. | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def email(self, escape=1): ''' Render the value of the property as an obscured email address ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def plain(self): ''' Render a "plain" representation of the property ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def plain(self): ''' Render a "plain" representation of the property ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def plain(self): ''' Render a "plain" representation of the property ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def plain(self): ''' Render a "plain" representation of the property ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def now(self, str_interval=None): ''' Return the current time. | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
raise ValueError, _('default value for ' | raise ValueError, self._('default value for ' | def field(self, size=30, default=None, format=_marker): '''Render a form edit field for the property | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def reldate(self, pretty=1): ''' Render the interval between the date and now. | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def pretty(self, format=_marker): ''' Render the date in a pretty format (eg. month names, spaces). | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def local(self, offset): ''' Return the date/time as a local (timezone offset) date/time. ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def plain(self): ''' Render a "plain" representation of the property ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def pretty(self): ''' Render the interval in a pretty format (eg. "yesterday") ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
raise AttributeError, "Can't access missing value" | msg = self._('Attempt to look up %(attr)s on a missing value') return MissingValue(msg%locals()) | def __getattr__(self, attr): ''' return a new HTMLItem ''' #print 'Link.getattr', (self, attr, self._value) if not self._value: raise AttributeError, "Can't access missing value" i = HTMLItem(self._client, self._prop.classname, self._value) return getattr(i, attr) | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def plain(self, escape=0): ''' Render a "plain" representation of the property ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
return _('[hidden]') | return self._('[hidden]') | def plain(self, escape=0): ''' Render a "plain" representation of the property ''' if not self.is_view_ok(): return _('[hidden]') | b8b5dcad40d558bb420083124fa7c9603708cbf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b8b5dcad40d558bb420083124fa7c9603708cbf4/templating.py |
self.finishRego() return | return self.finishRego() | def handle(self): """Attempt to create a new user based on the contents of the form and then set the cookie. | 18d623544ee2912fd66c34a45c52ac8e8747fe24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/18d623544ee2912fd66c34a45c52ac8e8747fe24/actions.py |
self.cache_lry.insert(0, key) | self.cache_lru.insert(0, key) | def getnode(self, classname, nodeid): ''' Get a node from the database. ''' if __debug__: print >>hyperdb.DEBUG, 'getnode', (self, classname, nodeid) | 5d64de598a41398c92361c0d3ba5b9eb175c0fc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5d64de598a41398c92361c0d3ba5b9eb175c0fc3/rdbms_common.py |
del self.cache[self.cache_lru.pop()] | if len(self.cache_lru) > ROW_CACHE_SIZE: del self.cache[self.cache_lru.pop()] | def getnode(self, classname, nodeid): ''' Get a node from the database. ''' if __debug__: print >>hyperdb.DEBUG, 'getnode', (self, classname, nodeid) | 5d64de598a41398c92361c0d3ba5b9eb175c0fc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5d64de598a41398c92361c0d3ba5b9eb175c0fc3/rdbms_common.py |
lmt = rfc822.formatdate(lmt) self.additional_headers['Last-Modified'] = lmt | self.additional_headers['Last-Modified'] = rfc822.formatdate(lmt) | def _serve_file(self, lmt, mime_type, content): ''' guts of serve_file() and serve_static_file() ''' # spit out headers self.additional_headers['Content-Type'] = mime_type self.additional_headers['Content-Length'] = str(len(content)) lmt = rfc822.formatdate(lmt) self.additional_headers['Last-Modified'] = lmt | 435b41f076477592d1db1b77d491de032fb847c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/435b41f076477592d1db1b77d491de032fb847c3/client.py |
lmtt = time.gmtime(ims)[:6] | lmtt = time.gmtime(lmt)[:6] | def _serve_file(self, lmt, mime_type, content): ''' guts of serve_file() and serve_static_file() ''' # spit out headers self.additional_headers['Content-Type'] = mime_type self.additional_headers['Content-Length'] = str(len(content)) lmt = rfc822.formatdate(lmt) self.additional_headers['Last-Modified'] = lmt | 435b41f076477592d1db1b77d491de032fb847c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/435b41f076477592d1db1b77d491de032fb847c3/client.py |
raise Unauthorised, _('You do not have permission to ' | raise Unauthorised, self._('You do not have permission to ' | def permission(self): """Check whether the user has permission to execute this action. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
raise ValueError, 'No type specified' | raise ValueError, self._('No type specified') | def handle(self, typere=re.compile('[@:]type'), numre=re.compile('[@:]number')): """Show a node of a particular class/id.""" t = n = '' for key in self.form.keys(): if typere.match(key): t = self.form[key].value.strip() elif numre.match(key): n = self.form[key].value.strip() if not t: raise ValueError, 'No type specifi... | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
raise SeriousError, _('No ID entered') | raise SeriousError, self._('No ID entered') | def handle(self, typere=re.compile('[@:]type'), numre=re.compile('[@:]number')): """Show a node of a particular class/id.""" t = n = '' for key in self.form.keys(): if typere.match(key): t = self.form[key].value.strip() elif numre.match(key): n = self.form[key].value.strip() if not t: raise ValueError, 'No type specifi... | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
raise SeriousError, _( | raise SeriousError, self._( | def handle(self, typere=re.compile('[@:]type'), numre=re.compile('[@:]number')): """Show a node of a particular class/id.""" t = n = '' for key in self.form.keys(): if typere.match(key): t = self.form[key].value.strip() elif numre.match(key): n = self.form[key].value.strip() if not t: raise ValueError, 'No type specifi... | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
raise ValueError, _('You may not retire the admin or anonymous user') | raise ValueError, self._( 'You may not retire the admin or anonymous user') | def handle(self): """Retire the context item.""" # if we want to view the index template now, then unset the nodeid # context info (a special-case for retire actions on the index page) nodeid = self.nodeid if self.template == 'index': self.client.nodeid = None | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
_('%(classname)s %(itemid)s has been retired')%{ | self._('%(classname)s %(itemid)s has been retired')%{ | def handle(self): """Retire the context item.""" # if we want to view the index template now, then unset the nodeid # context info (a special-case for retire actions on the index page) nodeid = self.nodeid if self.template == 'index': self.client.nodeid = None | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.error_message.append(_(rcsv.error)) | self.client.error_message.append(self._(rcsv.error)) | def handle(self): """Performs an edit of all of a class' items in one go. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
_('Not enough values on line %(line)s')%{'line':line}) | self._('Not enough values on line %(line)s')%{'line':line}) | def handle(self): """Performs an edit of all of a class' items in one go. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.ok_message.append(_('Items edited OK')) | self.client.ok_message.append(self._('Items edited OK')) | def handle(self): """Performs an edit of all of a class' items in one go. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
raise Unauthorised, _("You do not have permission to edit user roles") | raise Unauthorised, self._( "You do not have permission to edit user roles") | def editItemPermission(self, props): """Determine whether the user has permission to edit this item. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.error_message.append(_('Edit Error: ') + str(message)) | self.client.error_message.append( self._('Edit Error: %s') % str(message)) | def handle(self): """Perform an edit of an item in the database. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.error_message.append(_('Error: ') + str(message)) | self.client.error_message.append(self._('Error: %s') % str(message)) | def handle(self): ''' Add a new item to the database. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.error_message.append(_('Error: ') + str(message)) | self.client.error_message.append(_('Error: %s') % str(message)) | def handle(self): ''' Add a new item to the database. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
message = _('You are now registered, welcome!') | message = self._('You are now registered, welcome!') | def handle(self): """Grab the OTK, use it to load up the new user details.""" try: # pull the rego information out of the otk database self.userid = self.db.confirm_registration(self.form['otk'].value) except (ValueError, KeyError), message: self.client.error_message.append(str(message)) return | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
raise Unauthorised, _("It is not permitted to supply roles " "at registration.") | raise Unauthorised, self._( "It is not permitted to supply roles at registration.") | def handle(self): """Attempt to create a new user based on the contents of the form and then set the cookie. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.error_message.append(_('Error: A user with the ' | self.client.error_message.append(self._('Error: A user with the ' | def handle(self): """Attempt to create a new user based on the contents of the form and then set the cookie. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.ok_message.append(_('You are logged out')) | self.client.ok_message.append(self._('You are logged out')) | def handle(self): """Make us really anonymous - nuke the cookie too.""" # log us out self.client.make_user_anonymous() | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.error_message.append(_('Username required')) | self.client.error_message.append(self._('Username required')) | def handle(self): """Attempt to log a user in. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.error_message.append(_('No such user "%(name)s"')%locals()) | self.client.error_message.append(self._('No such user "%(name)s"') %locals()) | def handle(self): """Attempt to log a user in. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
self.client.error_message.append(_('Incorrect password')) | self.client.error_message.append(self._('Incorrect password')) | def handle(self): """Attempt to log a user in. | ade743793a8c591cf5f28a2d1c898d9c49ebe4f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ade743793a8c591cf5f28a2d1c898d9c49ebe4f6/actions.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.