rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
self.client.error_message.append(_("You do not have permission to login")) | self.client.error_message.append( self._("You do not have permission to login")) | 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._value = default | self._value = self._default_value = _value def str2value(self, value): """Return 'value' argument converted to internal representation""" return value def _value2str(self, value): """Return 'value' argument converted to external representation This is actual conversion method called only when value is not NODEFAULT.... | def __init__(self, config, section, setting, default=NODEFAULT, description=None, aliases=None | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
self._value = value | self._value = self.str2value(value) | def set(self, value): """Update the value""" self._value = value | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
self._value = self.default | self._value = self._default_value | def reset(self): """Reset the value to default""" self._value = self.default | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
return self._value == self.default | return self._value == self._default_value | def isdefault(self): """Return True if current value is the default one""" return self._value == self.default | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
def str(self, default=0): """Return string representation of the value If 'default' argument is set, format the default value. Otherwise format current value. """ if default: return str(self.default) else: return str(self._value) | def str(self, default=0): """Return string representation of the value | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py | |
return self.str() | return self.value2str(self._value) | def __str__(self): return self.str() | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
"default": self.str(default=1), "value": str(self), | "default": self.value2str(self._default_value), "value": self.value2str(self._value), | def __repr__(self): if self.isdefault(): _format = "<%(class)s %(name)s (default): %(value)s>" else: _format = "<%(class)s %(name)s (default: %(default)s): %(value)s>" return _format % { "class": self.__class__.__name__, "name": self.name, "default": self.str(default=1), "value": str(self), } | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
"default": self.str(default=1), | "default": self.value2str(self._default_value), | def format(self): """Return .ini file fragment for this option""" _desc_lines = [] for _description in (self.description, self.class_description): if _description: _desc_lines.extend(_description.split("\n")) # comment out the setting line if there is no value if self.isset(): _is_set = "" else: _is_set = "#" _rv = "# ... | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
"value": str(self), | "value": self.value2str(self._value), | def format(self): """Return .ini file fragment for this option""" _desc_lines = [] for _description in (self.description, self.class_description): if _description: _desc_lines.extend(_description.split("\n")) # comment out the setting line if there is no value if self.isset(): _is_set = "" else: _is_set = "#" _rv = "# ... | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
def str(self, default=0): if default: _val = self.default else: _val = self._value if _val: | def _value2str(self, value): if value: | def str(self, default=0): if default: _val = self.default else: _val = self._value if _val: return "yes" else: return "no" | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
def set(self, value): | def str2value(self, value): | def set(self, value): if type(value) == type(""): _val = value.lower() if _val in ("yes", "true", "on", "1"): _val = 1 elif _val in ("no", "false", "off", "0"): _val = 0 else: raise OptionValueError(self, value, self.class_description) else: _val = value and 1 or 0 Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
Option.set(self, _val) | return _val | def set(self, value): if type(value) == type(""): _val = value.lower() if _val in ("yes", "true", "on", "1"): _val = 1 elif _val in ("no", "false", "off", "0"): _val = 0 else: raise OptionValueError(self, value, self.class_description) else: _val = value and 1 or 0 Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
def set(self, value): | def str2value(self, value): | def set(self, value): _val = value.lower() if _val in ("yes", "no", "new"): Option.set(self, _val) else: raise OptionValueError(self, value, self.class_description) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
Option.set(self, _val) | return _val | def set(self, value): _val = value.lower() if _val in ("yes", "no", "new"): Option.set(self, _val) else: raise OptionValueError(self, value, self.class_description) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
def set(self, value): | def str2value(self, value): | def set(self, value): try: _val = float(value) except ValueError: raise OptionValueError(self, value, "Floating point number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
_val = float(value) | return float(value) | def set(self, value): try: _val = float(value) except ValueError: raise OptionValueError(self, value, "Floating point number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
else: Option.set(self, _val) | def _value2str(self, value): _val = str(value) if _val.endswith(".0"): _val = _val[:-2] return _val | def set(self, value): try: _val = float(value) except ValueError: raise OptionValueError(self, value, "Floating point number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
def set(self, value): | def str2value(self, value): | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
_val = int(value) | return int(value) | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
else: Option.set(self, _val) | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py | |
(Option, "domain", NODEFAULT, "Domain name used for email addresses"), | (Option, "domain", NODEFAULT, "Domain name used for email addresses."), | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
(Option, "username", NODEFAULT, "SMTP login name\n" "Set this if your mail host requires authenticated access"), | (Option, "username", "", "SMTP login name\n" "Set this if your mail host requires authenticated access.\n" "If username is not empty, password (below) MUST be set!"), | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
"Set this if your mail host requires authenticated access"), | "Set this if your mail host requires authenticated access."), | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
(FilePathOption, "tls_keyfile", NODEFAULT, | (FilePathOption, "tls_keyfile", "", | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
(FilePathOption, "tls_certfile", NODEFAULT, | (FilePathOption, "tls_certfile", "", | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py |
if directions: | if '-' in directions: | def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None), num_re = re.compile('^\d+$')): """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. | 3bad97c7dfa17ae2a98da19763df291a34261e3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3bad97c7dfa17ae2a98da19763df291a34261e3f/back_anydbm.py |
roundup create [-user login] classanme propname=value ... | roundup create [-user login] classname propname=value ... | def usage(): print '''Usage: roundup init roundup spec classname roundup create [-user login] classanme propname=value ... roundup list [-list] classname roundup history [-list] designator roundup get [-list] designator[,designator,...] propname roundup set [-user login] designator[,designator,...] propname=value ... ... | 5085cef19731f3fa1157f0f6c5adf9131214c91e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5085cef19731f3fa1157f0f6c5adf9131214c91e/roundup.py |
def main(): if len(sys.argv) == 1: usage() return 1 command = sys.argv[1] if command == 'init': password = '' confirm = 'x' while password != confirm: password = getpass.getpass('Admin Password:') confirm = getpass.getpass(' Confirm:') roundupdb.initDB(config.DATABASE, password) return 0 if command == 'get': d... | 5085cef19731f3fa1157f0f6c5adf9131214c91e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5085cef19731f3fa1157f0f6c5adf9131214c91e/roundup.py | ||
subject_re = re.compile(r'(?P<refwd>\s*\W?\s*(fwd|re|aw)\W\s*)*' | subject_re = re.compile(r'(?P<refwd>\s*\W?\s*(fw|fwd|re|aw)\W\s*)*' | def getPart(self): ''' Get a single part of a multipart message and return it as a new Message instance. ''' boundary = self.getparam('boundary') mid, end = '--'+boundary, '--'+boundary+'--' s = cStringIO.StringIO() while 1: line = self.fp.readline() if not line: break if line.strip() in (mid, end): break s.write(line)... | 3704ad54b49fc472499d8dfb2af3b85f0c324676 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3704ad54b49fc472499d8dfb2af3b85f0c324676/mailgw.py |
name = part.getparam('name').strip() | name = part.getparam('name') if name: name = name.strip() | def handle_message(self, message): ''' message - a Message instance | 3704ad54b49fc472499d8dfb2af3b85f0c324676 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3704ad54b49fc472499d8dfb2af3b85f0c324676/mailgw.py |
name = disp.getparam('filename').strip() | name = disp.getparam('filename') if name: name = name.strip() | def handle_message(self, message): ''' message - a Message instance | 3704ad54b49fc472499d8dfb2af3b85f0c324676 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3704ad54b49fc472499d8dfb2af3b85f0c324676/mailgw.py |
def __init__(self, instance, request, env, form=None): hyperdb.traceMark() self.instance = instance self.request = request self.env = env | 216f3373f2837097264c88f2a279e359cc9bdb1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/216f3373f2837097264c88f2a279e359cc9bdb1d/client.py | ||
path = '/'.join((self.env['SCRIPT_NAME'], self.env['TRACKER_NAME'], '')) | 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() | 216f3373f2837097264c88f2a279e359cc9bdb1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/216f3373f2837097264c88f2a279e359cc9bdb1d/client.py | |
'roundup_user_2=%s; expires=%s; Path=%s;'%(self.session, expire, path) | 'roundup_user_2=%s; expires=%s; Path=%s;'%(self.session, expire, self.cookie_path) | 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() | 216f3373f2837097264c88f2a279e359cc9bdb1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/216f3373f2837097264c88f2a279e359cc9bdb1d/client.py |
path = '/'.join((self.env['SCRIPT_NAME'], self.env['TRACKER_NAME'], '')) | def logout_action(self): ''' Make us really anonymous - nuke the cookie too ''' # log us out self.make_user_anonymous() | 216f3373f2837097264c88f2a279e359cc9bdb1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/216f3373f2837097264c88f2a279e359cc9bdb1d/client.py | |
'roundup_user_2=deleted; Max-Age=0; expires=%s; Path=%s;'%(now, path) | 'roundup_user_2=deleted; Max-Age=0; expires=%s; Path=%s;'%(now, self.cookie_path) | def logout_action(self): ''' Make us really anonymous - nuke the cookie too ''' # log us out self.make_user_anonymous() | 216f3373f2837097264c88f2a279e359cc9bdb1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/216f3373f2837097264c88f2a279e359cc9bdb1d/client.py |
'''Usage: set [items] property=value property=value ... | '''Usage: set items property=value property=value ... | def do_set(self, args, pwre = re.compile(r'{(\w+)}(.+)')): '''Usage: set [items] property=value property=value ... Set the given properties of one or more items(s). | b621e202c83f5fd2e52970fc59f488a029020086 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b621e202c83f5fd2e52970fc59f488a029020086/admin.py |
The items may be specified as a class or as a comma-separated | The items are specified as a class or as a comma-separated | def do_set(self, args, pwre = re.compile(r'{(\w+)}(.+)')): '''Usage: set [items] property=value property=value ... Set the given properties of one or more items(s). | b621e202c83f5fd2e52970fc59f488a029020086 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b621e202c83f5fd2e52970fc59f488a029020086/admin.py |
for required in 'config open init Client MailGW'.split(): | for required in 'open init Client MailGW'.split(): | def open(self, tracker_home): ''' Open the tracker. | ded4b0bcdd08165ee707017fe0b9b79c7cde55a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ded4b0bcdd08165ee707017fe0b9b79c7cde55a9/instance.py |
config = tracker.config if hasattr(config, 'LOGGING_CONFIG'): try: import logging config.logging = logging except ImportError, msg: raise TrackerError, 'Python logging module unavailable: %s'%msg config.logging.fileConfig(config.LOGGING_CONFIG) else: config.logging = rlog.BasicLogging() if hasattr(config, 'LOGGING_FIL... | tracker.config = configuration.Config(tracker_home) tracker.dbinit.config = tracker.config | def open(self, tracker_home): ''' Open the tracker. | ded4b0bcdd08165ee707017fe0b9b79c7cde55a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ded4b0bcdd08165ee707017fe0b9b79c7cde55a9/instance.py |
def formatdate(timeval): return time.strftime("%a, %d %b %Y %H:%M:%S +0000", timeval) | def formatdate(): return time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) | def formatdate(timeval): return time.strftime("%a, %d %b %Y %H:%M:%S +0000", timeval) | e1c3f4543450d9902658509b60a8c2254dcf1dec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e1c3f4543450d9902658509b60a8c2254dcf1dec/mailer.py |
writer.addheader('Date', formatdate(time.mktime(time.gmtime()))) | writer.addheader('Date', formatdate()) | def get_standard_message(self, to, subject, author=None): '''Form a standard email message from Roundup. | e1c3f4543450d9902658509b60a8c2254dcf1dec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e1c3f4543450d9902658509b60a8c2254dcf1dec/mailer.py |
m = ['Subject: [%s%s] %s'%(cn, nodeid, title)] m.append('To: %s'%', '.join(sendto)) m.append('From: %s'%self.ISSUE_TRACKER_EMAIL) m.append('Reply-To: %s'%self.ISSUE_TRACKER_EMAIL) m.append('') | m = [] | def sendmessage(self, nodeid, msgid): """Send a message to the members of an issue's nosy list. | b6b95a02dad9c90234dc0ca6c979a875ab7a63cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b6b95a02dad9c90234dc0ca6c979a875ab7a63cf/roundupdb.py |
smtp.sendmail(self.ISSUE_TRACKER_EMAIL, sendto, '\n'.join(m)) | smtp.sendmail(self.ISSUE_TRACKER_EMAIL, sendto, message.getvalue()) | def sendmessage(self, nodeid, msgid): """Send a message to the members of an issue's nosy list. | b6b95a02dad9c90234dc0ca6c979a875ab7a63cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b6b95a02dad9c90234dc0ca6c979a875ab7a63cf/roundupdb.py |
"Couldn't send confirmation email: %s"%value | "Couldn't send confirmation email: %s"%value | def sendmessage(self, nodeid, msgid): """Send a message to the members of an issue's nosy list. | b6b95a02dad9c90234dc0ca6c979a875ab7a63cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b6b95a02dad9c90234dc0ca6c979a875ab7a63cf/roundupdb.py |
web = self.ISSUE_TRACKER_WEB | web = self.ISSUE_TRACKER_WEB + 'issue'+ nodeid | def email_footer(self, nodeid, msgid): ''' Add a footer to the e-mail with some useful information ''' web = self.ISSUE_TRACKER_WEB return '''%s | b6b95a02dad9c90234dc0ca6c979a875ab7a63cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b6b95a02dad9c90234dc0ca6c979a875ab7a63cf/roundupdb.py |
kwargs = rdbms_common.connection_dict(config) | kwargs = connection_dict(config) | def db_nuke(config): """Clear all database contents and drop database itself""" if db_exists(config): kwargs = rdbms_common.connection_dict(config) conn = MySQLdb.connect(**kwargs) try: conn.select_db(config.RDBMS_NAME) except: # no, it doesn't exist pass else: cursor = conn.cursor() cursor.execute("SHOW TABLES") table... | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
kwargs = rdbms_common.connection_dict(config) | kwargs = connection_dict(config) | def db_create(config): """Create the database.""" kwargs = rdbms_common.connection_dict(config) conn = MySQLdb.connect(**kwargs) cursor = conn.cursor() command = "CREATE DATABASE %s"%config.RDBMS_NAME config.logging.getLogger('hyperdb').info(command) cursor.execute(command) conn.commit() conn.close() | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
kwargs = rdbms_common.connection_dict(config) | kwargs = connection_dict(config) | def db_exists(config): """Check if database already exists.""" kwargs = rdbms_common.connection_dict(config) conn = MySQLdb.connect(**kwargs) try: try: conn.select_db(config.RDBMS_NAME) except MySQLdb.OperationalError: return 0 finally: conn.close() return 1 | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
kwargs = rdbms_common.connection_dict(config, 'db') | kwargs = connection_dict(self.config) | def sql_open_connection(self): kwargs = rdbms_common.connection_dict(config, 'db') self.config.logging.getLogger('hyperdb').info('open database %r'%( kwargs['db'],)) try: conn = MySQLdb.connect(**kwargs) except MySQLdb.OperationalError, message: raise DatabaseError, message cursor = conn.cursor() cursor.execute("SET AU... | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
def sql_open_connection(self): kwargs = rdbms_common.connection_dict(config, 'db') self.config.logging.getLogger('hyperdb').info('open database %r'%( kwargs['db'],)) try: conn = MySQLdb.connect(**kwargs) except MySQLdb.OperationalError, message: raise DatabaseError, message cursor = conn.cursor() cursor.execute("SET AU... | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py | ||
sql = '''insert into %s (linkid, nodeid) values | sql = '''insert into %s (linkid, nodeid) values | def add_new_columns_v2(self): '''While we're adding the actor column, we need to update the tables to have the correct datatypes.''' for klass in self.classes.values(): cn = klass.classname properties = klass.getprops() old_spec = self.database_schema['tables'][cn] | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
elif (isinstance(prop, Boolean) or | elif (isinstance(prop, Boolean) or | def add_new_columns_v2(self): '''While we're adding the actor column, we need to update the tables to have the correct datatypes.''' for klass in self.classes.values(): cn = klass.classname properties = klass.getprops() old_spec = self.database_schema['tables'][cn] | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
def add_new_columns_v2(self): '''While we're adding the actor column, we need to update the tables to have the correct datatypes.''' for klass in self.classes.values(): cn = klass.classname properties = klass.getprops() old_spec = self.database_schema['tables'][cn] | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py | ||
''' create the journal table for a class given the spec and | ''' create the journal table for a class given the spec and | def create_journal_table(self, spec): ''' create the journal table for a class given the spec and already-determined cols ''' # journal table cols = ','.join(['%s varchar'%x for x in 'nodeid date tag action params'.split()]) sql = '''create table %s__journal ( nodeid integer, date datetime, tag varchar(255), action var... | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
pass | pass | 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 | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
pass | pass | 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 | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py |
def sortfun(a, b, dir=sortby[i], i=i): if dir == '-': return cmp(b[1][i], a[1][i]) else: return cmp(a[1][i], b[1][i]) | 7018ac4ab698076fd636cfffa0418fe0fe314a9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7018ac4ab698076fd636cfffa0418fe0fe314a9b/back_mysql.py | ||
if str(message).find('"schema" does not exist') == -1: | if str(message).find('schema') == -1: | def open_connection(self): if not db_exists(self.config): db_create(self.config) | 868842767e26dcffac6fc2946412f2c7d9a0b3a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/868842767e26dcffac6fc2946412f2c7d9a0b3a5/back_postgresql.py |
set = {} | 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. | e1890a266b788129d73a5b0075366b60e4b578ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e1890a266b788129d73a5b0075366b60e4b578ce/hyperdb.py | |
def Choice(name, *options): cl = Class(db, name, name=hyperdb.String(), order=hyperdb.String()) | def Choice(name, db, *options): '''Quick helper to create a simple class with choices ''' cl = Class(db, name, name=String(), order=String()) | def Choice(name, *options): cl = Class(db, name, name=hyperdb.String(), order=hyperdb.String()) for i in range(len(options)): cl.create(name=option[i], order=i) return hyperdb.Link(name) | e1890a266b788129d73a5b0075366b60e4b578ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e1890a266b788129d73a5b0075366b60e4b578ce/hyperdb.py |
cl.create(name=option[i], order=i) | cl.create(name=options[i], order=i) | def Choice(name, *options): cl = Class(db, name, name=hyperdb.String(), order=hyperdb.String()) for i in range(len(options)): cl.create(name=option[i], order=i) return hyperdb.Link(name) | e1890a266b788129d73a5b0075366b60e4b578ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e1890a266b788129d73a5b0075366b60e4b578ce/hyperdb.py |
w('<tr class="list-header">' '<td align=left colspan=%s><strong>%s</strong></td></tr>'%( | w('<tr class="section-bar">' '<td align=middle colspan=%s><strong>%s</strong></td></tr>'%( | def index(client, templates, db, classname, filterspec={}, filter=[], columns=[], sort=[], group=[], show_display_form=1, nodeids=None, col_re=re.compile(r'<property\s+name="([^>]+)">')): globals = { 'plain': Plain(db, templates, classname, form={}), 'field': Field(db, templates, classname, form={}), 'menu': Menu(db, t... | 7dca9cd18f724ffaaff8fafd3cf0dc840463c114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7dca9cd18f724ffaaff8fafd3cf0dc840463c114/htmltemplate.py |
<td><input name="__newuser_realname"></td></tr> | <td><input name="realname"></td></tr> | def login(self, message=None): self.pagehead('Login to roundup', message) self.write(''' | d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py |
<td><input name="__newuser_organisation"></td></tr> | <td><input name="organisation"></td></tr> | def login(self, message=None): self.pagehead('Login to roundup', message) self.write(''' | d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py |
<td><input name="__newuser_address"></td></tr> | <td><input name="address"></td></tr> | def login(self, message=None): self.pagehead('Login to roundup', message) self.write(''' | d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py |
<td><input name="__newuser_phone"></td></tr> | <td><input name="phone"></td></tr> | def login(self, message=None): self.pagehead('Login to roundup', message) self.write(''' | d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py |
<td><input name="__newuser_username"></td></tr> | <td><input name="username"></td></tr> | def login(self, message=None): self.pagehead('Login to roundup', message) self.write(''' | d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py |
<td><input type="password" name="__newuser_password"></td></tr> | <td><input type="password" name="password"></td></tr> | def login(self, message=None): self.pagehead('Login to roundup', message) self.write(''' | d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py |
<td><input type="password" name="__newuser_confirm"></td></tr> | <td><input type="password" name="confirm"></td></tr> | def login(self, message=None): self.pagehead('Login to roundup', message) self.write(''' | d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py |
if self.ANONYMOUS_REGISTER == 'deny' and self.user is None: return self.login() | def main(self, dre=re.compile(r'([^\d]+)(\d+)'), nre=re.compile(r'new(\w+)')): | d8fdd05fd133bc265c9bbd84b89aed3fedf2c085 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8fdd05fd133bc265c9bbd84b89aed3fedf2c085/cgi_client.py | |
def handle_message(self, message): ''' message - a Message instance | d707f9bfdb46f60188adeb8fefab434f16a66f3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d707f9bfdb46f60188adeb8fefab434f16a66f3d/mailgw.py | ||
raise Unauthorized, ''' | author = anonid if not self.db.security.hasPermission('Email Access', author): if author == anonid: raise Unauthorized, ''' | def handle_message(self, message): ''' message - a Message instance | d707f9bfdb46f60188adeb8fefab434f16a66f3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d707f9bfdb46f60188adeb8fefab434f16a66f3d/mailgw.py |
if not self.db.security.hasPermission('Email Access', author): raise Unauthorized, 'You are not permitted to access this tracker.' | else: raise Unauthorized, 'You are not permitted to access '\ 'this tracker.' | def handle_message(self, message): ''' message - a Message instance | d707f9bfdb46f60188adeb8fefab434f16a66f3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d707f9bfdb46f60188adeb8fefab434f16a66f3d/mailgw.py |
s = '' s = s + '<%s' % tag | self.append_data('<%s' % tag) closeit = 1 | def unknown_starttag(self, tag, attributes): s = '' s = s + '<%s' % tag for name, value in attributes: s = s + ' %s="%s"' % (name, value) s = s + '>' self.append_data(s) | eecf84409008a8f6cdf52c06568a4c12dab22c42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eecf84409008a8f6cdf52c06568a4c12dab22c42/template_parser.py |
s = s + ' %s="%s"' % (name, value) s = s + '>' self.append_data(s) | pos = value.find('<') if pos > -1: self.append_data(' %s="%s' % (name, value[:pos])) closeit = 0 else: self.append_data(' %s="%s"' % (name, value)) if closeit: self.append_data('>') | def unknown_starttag(self, tag, attributes): s = '' s = s + '<%s' % tag for name, value in attributes: s = s + ' %s="%s"' % (name, value) s = s + '>' self.append_data(s) | eecf84409008a8f6cdf52c06568a4c12dab22c42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eecf84409008a8f6cdf52c06568a4c12dab22c42/template_parser.py |
except MessageSendException, e: | except MessageSendError, e: | def standard_message(self, to, subject, body, author=None): try: self.mailer.standard_message(to, subject, body, author) return 1 except MessageSendException, e: self.error_message.append(str(e)) | d4c144cdfcc188fa0310d55222134186953f113b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d4c144cdfcc188fa0310d55222134186953f113b/client.py |
print `summary`, `content` | def testParagraphs(self): s = '''testing\n\ntesting\n\ntesting''' summary, content = parseContent(s) print `summary`, `content` self.assertEqual(summary, 'testing') self.assertEqual(content, 'testing\n\ntesting\n\ntesting') | 6f142057cebd19290a6f80d3746296b65a1cab56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6f142057cebd19290a6f80d3746296b65a1cab56/test_mailsplit.py | |
def history(self, direction='descending', dre=re.compile('^\d+$')): self.view_check() | 923640e8a1b710bdc59dd15440e4cf7f43bf0518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/923640e8a1b710bdc59dd15440e4cf7f43bf0518/templating.py | ||
r'(?P<item>(?P<class>[A-Za-z_]+)(\s*)?(?P<id>\d+)))') | r'(?P<item>(?P<class>[A-Za-z_]+)(\s*)(?P<id>\d+)))') | def is_view_ok(self): ''' Is the user allowed to View the current class? ''' if self._db.security.hasPermission('View', self._client.userid, self._classname, self._name, self._nodeid): return 1 return self.is_edit_ok() | 923640e8a1b710bdc59dd15440e4cf7f43bf0518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/923640e8a1b710bdc59dd15440e4cf7f43bf0518/templating.py |
if (props['status'] == unread_id or props['status'] == resolved_id and current_status == resolved_id): | if new_status == unread_id or (new_status == resolved_id and current_status == resolved_id): | def _changenode(self, props): ''' change the node based on the contents of the form ''' cl = self.db.classes[self.classname] # set status to chatting if 'unread' or 'resolved' try: # determine the id of 'unread','resolved' and 'chatting' unread_id = self.db.status.lookup('unread') resolved_id = self.db.status.lookup('r... | 660e336bd471b31b5546a3b92a0bec2174158b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/660e336bd471b31b5546a3b92a0bec2174158b36/cgi_client.py |
if props.has_key('assignedto'): assignedto_id = props['assignedto'] if assignedto_id not in props['nosy']: props['nosy'].append(assignedto_id) | self._add_assignedto_to_nosy(props) | def _changenode(self, props): ''' change the node based on the contents of the form ''' cl = self.db.classes[self.classname] # set status to chatting if 'unread' or 'resolved' try: # determine the id of 'unread','resolved' and 'chatting' unread_id = self.db.status.lookup('unread') resolved_id = self.db.status.lookup('r... | 660e336bd471b31b5546a3b92a0bec2174158b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/660e336bd471b31b5546a3b92a0bec2174158b36/cgi_client.py |
if props.has_key('assignedto'): assignedto_id = props['assignedto'] if props.has_key('nosy') and assignedto_id not in props['nosy']: props['nosy'].append(assignedto_id) else: props['nosy'] = [assignedto_id] | self._add_assignedto_to_nosy(props) | def _createnode(self): ''' create a node based on the contents of the form ''' cl = self.db.classes[self.classname] props, dummy = parsePropsFromForm(self.db, cl, self.form) | 660e336bd471b31b5546a3b92a0bec2174158b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/660e336bd471b31b5546a3b92a0bec2174158b36/cgi_client.py |
class_description = "" | def format(self): return "%(name)s = %(value)s\n" % { "name": self.setting, "value": self.value2str(self._value), } | def setuid(user): if not hasattr(os, 'getuid'): return # People can remove this check if they're really determined if user is None: if os.getuid(): return raise ValueError, _("Can't run as root!") if os.getuid(): print _('WARNING: ignoring "-u" argument, not root') try: import pwd except ImportError: raise ValueErro... | fc3711ee01817827cb440f695c797e7c332639a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/fc3711ee01817827cb440f695c797e7c332639a3/roundup_server.py |
config.add_option( configuration.FilePathOption(config, "trackers", name)) | config.add_option(TrackerHomeOption(config, "trackers", name)) | 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 import socket if hasattr(socket, 'setdefaulttimeout'): socket.setdefaulttimeout(60) config = ServerConfig() options = "hvS" if RoundupService: options += 'c' try: (opt... | fc3711ee01817827cb440f695c797e7c332639a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/fc3711ee01817827cb440f695c797e7c332639a3/roundup_server.py |
return str(msgid).upper() | def translate(self, domain, msgid, mapping=None, context=None, target_language=None, default=None): return str(msgid).upper() def repl(m, mapping=mapping): return ustr(mapping[m.group(m.lastindex)]) cre = re.compile(r'\$(?:(%s)|\{(%s)\})' % (NAME_RE, NAME_RE)) return cre.sub(repl, default or msgid) | 69a57fe7f0f496e49ec9e12b05dd6b409fe3a3fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/69a57fe7f0f496e49ec9e12b05dd6b409fe3a3fb/GlobalTranslationService.py | |
class StaticTranslationService: """Translation service for application default language This service uses "static" translation, with single domain and target language, initialized from OS environment when roundup.i18n is loaded. 'domain' and 'target_language' parameters to 'translate()' are ignored. Returned string... | translationService = DummyTranslationService() | def repl(m, mapping=mapping): return ustr(mapping[m.group(m.lastindex)]) | 69a57fe7f0f496e49ec9e12b05dd6b409fe3a3fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/69a57fe7f0f496e49ec9e12b05dd6b409fe3a3fb/GlobalTranslationService.py |
<a href="issue?assignedto=%(userid)s&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:filter=status,assignedto&:sort=activity&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">My Issues</a> | | <a href="issue?assignedto=%(userid)s&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:filter=status,assignedto&:sort=-activity&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">My Issues</a> | | def pagehead(self, title, message=None): url = self.env['SCRIPT_NAME'] + '/' machine = self.env['SERVER_NAME'] port = self.env['SERVER_PORT'] if port != '80': machine = machine + ':' + port base = urlparse.urlunparse(('http', machine, url, None, None, None)) if message is not None: message = _('<div class="system-msg">... | 7f60ba367a20148ac64b24195609ac743b6f72b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7f60ba367a20148ac64b24195609ac743b6f72b6/cgi_client.py |
<a href="issue?status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:filter=status&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">Issues</a> | <a href="issue?status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=-activity&:filter=status&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">Issues</a> | def pagehead(self, title, message=None): url = self.env['SCRIPT_NAME'] + '/' machine = self.env['SERVER_NAME'] port = self.env['SERVER_PORT'] if port != '80': machine = machine + ':' + port base = urlparse.urlunparse(('http', machine, url, None, None, None)) if message is not None: message = _('<div class="system-msg">... | 7f60ba367a20148ac64b24195609ac743b6f72b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7f60ba367a20148ac64b24195609ac743b6f72b6/cgi_client.py |
<a href="issue?assignedto=-1&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:filter=status,assignedto&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">Issues</a> | <a href="issue?assignedto=-1&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=-activity&:filter=status,assignedto&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">Issues</a> | def pagehead(self, title, message=None): url = self.env['SCRIPT_NAME'] + '/' machine = self.env['SERVER_NAME'] port = self.env['SERVER_PORT'] if port != '80': machine = machine + ':' + port base = urlparse.urlunparse(('http', machine, url, None, None, None)) if message is not None: message = _('<div class="system-msg">... | 7f60ba367a20148ac64b24195609ac743b6f72b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7f60ba367a20148ac64b24195609ac743b6f72b6/cgi_client.py |
return | return 1 | def login(self, message=None, newuser_form=None, action='index'): self.pagehead(_('Login to roundup'), message) self.write(_(''' | 7f60ba367a20148ac64b24195609ac743b6f72b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7f60ba367a20148ac64b24195609ac743b6f72b6/cgi_client.py |
return self.login(message=_('No such user "%(name)s"')%locals()) | action = self.form['__destination_url'].value return self.login(message=_('No such user "%(name)s"')%locals(), action=action) | def login_action(self, message=None): if not self.form.has_key('__login_name'): return self.login(message=_('Username required')) self.user = self.form['__login_name'].value if self.form.has_key('__login_password'): password = self.form['__login_password'].value else: password = '' # make sure the user exists try: uid ... | 7f60ba367a20148ac64b24195609ac743b6f72b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7f60ba367a20148ac64b24195609ac743b6f72b6/cgi_client.py |
return self.login(message=_('Incorrect password')) | action = self.form['__destination_url'].value return self.login(message=_('Incorrect password'), action=action) | def login_action(self, message=None): if not self.form.has_key('__login_name'): return self.login(message=_('Username required')) self.user = self.form['__login_name'].value if self.form.has_key('__login_password'): password = self.form['__login_password'].value else: password = '' # make sure the user exists try: uid ... | 7f60ba367a20148ac64b24195609ac743b6f72b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7f60ba367a20148ac64b24195609ac743b6f72b6/cgi_client.py |
<a href="issue?assignedto=%(userid)s&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:filter=status,assignedto&:sort=activity&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">My Issues</a> | <a href="support?assignedto=%(userid)s&status=-1,unread,deferred,chatti... | <a href="issue?assignedto=%(userid)s&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:filter=status,assignedto&:sort=-activity&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">My Issues</a> | <a href="support?assignedto=%(userid)s&status=-1,unread,deferred,chatt... | def pagehead(self, title, message=None): url = self.env['SCRIPT_NAME'] + '/' #self.env.get('PATH_INFO', '/') machine = self.env['SERVER_NAME'] port = self.env['SERVER_PORT'] if port != '80': machine = machine + ':' + port base = urlparse.urlunparse(('http', machine, url, None, None, None)) if message is not None: messa... | 7f60ba367a20148ac64b24195609ac743b6f72b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7f60ba367a20148ac64b24195609ac743b6f72b6/cgi_client.py |
<a href="issue?assignedto=-1&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:filter=status,assignedto&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">Issues</a>, <a href="support?assignedto=-1&status=-1,unread,deferred,chatting,need-eg,in-progre... | <a href="issue?assignedto=-1&status=-1,unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=-activity&:filter=status,assignedto&:columns=id,activity,status,title,assignedto&:group=priority&show_customization=1">Issues</a>, <a href="support?assignedto=-1&status=-1,unread,deferred,chatting,need-eg,in-progr... | def pagehead(self, title, message=None): url = self.env['SCRIPT_NAME'] + '/' #self.env.get('PATH_INFO', '/') machine = self.env['SERVER_NAME'] port = self.env['SERVER_PORT'] if port != '80': machine = machine + ':' + port base = urlparse.urlunparse(('http', machine, url, None, None, None)) if message is not None: messa... | 7f60ba367a20148ac64b24195609ac743b6f72b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7f60ba367a20148ac64b24195609ac743b6f72b6/cgi_client.py |
"""Usage: %(program)s [-v] [-c] [[-C class] -S field=value]* <instance home> [method] | """Usage: %(program)s [-v] [-c class] [[-C class] -S field=value]* <instance home> [method] | def usage(args, message=None): if message is not None: print message print _( | 7b226a82b723bac587accc5791b8298e420222e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b226a82b723bac587accc5791b8298e420222e9/roundup_mailgw.py |
optionsList, args = getopt.getopt(argv[1:], 'vcC:S:', ['set=', | optionsList, args = getopt.getopt(argv[1:], 'vc:C:S:', ['set=', | def main(argv): '''Handle the arguments to the program and initialise environment. ''' # take the argv array and parse it leaving the non-option # arguments in the args array. try: optionsList, args = getopt.getopt(argv[1:], 'vcC:S:', ['set=', 'class=']) except getopt.GetoptError: # print help information and exit: usa... | 7b226a82b723bac587accc5791b8298e420222e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b226a82b723bac587accc5791b8298e420222e9/roundup_mailgw.py |
if classname != 'file': | self.opendb('admin') klass = self.db.getclass(classname) props = klass.getprops() if not pops.has_key('type'): | 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) if classname != 'file': raise NotFound, designator | 2f6b05e7d229b44e95d3fddb3c5e8e60912dfa5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2f6b05e7d229b44e95d3fddb3c5e8e60912dfa5b/client.py |
self.opendb('admin') file = self.db.file mime_type = file.get(nodeid, 'type') content = file.get(nodeid, 'content') lmt = file.get(nodeid, 'activity').timestamp() | if not pops.has_key('content'): raise NotFound, designator mime_type = klass.get(nodeid, 'type') content = klass.get(nodeid, 'content') lmt = klass.get(nodeid, 'activity').timestamp() | 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) if classname != 'file': raise NotFound, designator | 2f6b05e7d229b44e95d3fddb3c5e8e60912dfa5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2f6b05e7d229b44e95d3fddb3c5e8e60912dfa5b/client.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.