bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def reviewBans(self): try: reviewAfterTime = int(self.registryValue('reviewAfterTime') * 84600) if not reviewAfterTime: # time is zero, do nothing return self.log.debug('Checking for bans that need review ...') now = time.mktime(time.gmtime()) lastreview = self.registryValue('reviewTime') if not lastreview: # initializ...
def reviewBans(self): try: reviewAfterTime = int(self.registryValue('reviewAfterTime') * 84600) if not reviewAfterTime: # time is zero, do nothing return self.log.debug('Checking for bans that need review ...') now = time.mktime(time.gmtime()) lastreview = self.registryValue('reviewTime') if not lastreview: # initializ...
448,400
def get_banId(self, mask, channel): data = self.db_run("SELECT MAX(id) FROM bans WHERE mask=%s AND channel=%s", (mask, channel), True)[0] if not data[0]: return return int(data[0])
def get_banId(self, mask, channel): data = self.db_run("SELECT MAX(id) FROM bans WHERE mask=%s AND channel=%s", (mask, channel), True) if data: data = data[0] if not data or not data[0]: return return int(data[0])
448,401
def unit_maker(func, func0): "Test that ny.nanxxx gives the same output as np.." a0 = np.array([1, 2, 3, 4, 5, 6, nan, nan, 7, 8, 9]) a1 = np.arange(10) a2 = np.array([[9.0, 3.0, nan, nan, 9.0, nan], [1.0, 1.0, 1.0, nan, nan, nan], [2.0, 2.0, 0.1, nan, 1.0, nan], [3.0, 9.0, 2.0, nan, nan, nan], [4.0, 4.0, 3.0, 9.0, 2.0...
def unit_maker(func, func0): "Test that ny.nanxxx gives the same output as np.." msg = '\nfunc %s | input %s (%s) | shape %s | axis %s\n' for i, arr in enumerate(arrs): for axis in range(-arr.ndim, arr.ndim) + [None]: actual = func(arr, axis=axis) desired = func0(arr, axis=axis) tup = (func.__name__, 'a'+str(i), str(ar...
448,402
def unit_maker(func, func0): "Test that ny.nanxxx gives the same output as np.." a0 = np.array([1, 2, 3, 4, 5, 6, nan, nan, 7, 8, 9]) a1 = np.arange(10) a2 = np.array([[9.0, 3.0, nan, nan, 9.0, nan], [1.0, 1.0, 1.0, nan, nan, nan], [2.0, 2.0, 0.1, nan, 1.0, nan], [3.0, 9.0, 2.0, nan, nan, nan], [4.0, 4.0, 3.0, 9.0, 2.0...
def unit_maker(func, func0): "Test that ny.nanxxx gives the same output as np.." a0 = np.array([1, 2, 3, 4, 5, 6, nan, nan, 7, 8, 9]) a1 = np.arange(10) a2 = np.array([[9.0, 3.0, nan, nan, 9.0, nan], [1.0, 1.0, 1.0, nan, nan, nan], [2.0, 2.0, 0.1, nan, 1.0, nan], [3.0, 9.0, 2.0, nan, nan, nan], [4.0, 4.0, 3.0, 9.0, 2.0...
448,403
def unit_maker(func, func0): "Test that ny.nanxxx gives the same output as np.." a0 = np.array([1, 2, 3, 4, 5, 6, nan, nan, 7, 8, 9]) a1 = np.arange(10) a2 = np.array([[9.0, 3.0, nan, nan, 9.0, nan], [1.0, 1.0, 1.0, nan, nan, nan], [2.0, 2.0, 0.1, nan, 1.0, nan], [3.0, 9.0, 2.0, nan, nan, nan], [4.0, 4.0, 3.0, 9.0, 2.0...
def unit_maker(func, func0): "Test that ny.nanxxx gives the same output as np.." a0 = np.array([1, 2, 3, 4, 5, 6, nan, nan, 7, 8, 9]) a1 = np.arange(10) a2 = np.array([[9.0, 3.0, nan, nan, 9.0, nan], [1.0, 1.0, 1.0, nan, nan, nan], [2.0, 2.0, 0.1, nan, 1.0, nan], [3.0, 9.0, 2.0, nan, nan, nan], [4.0, 4.0, 3.0, 9.0, 2.0...
448,404
def _inotify_event(self, mask, name, target=None): """ Callback for inotify. """ name = py3_b(name) if mask & INotify.MODIFY and self._bursthandler.is_growing(name): # A file was modified. Do this check as fast as we can because the # events may come in bursts when a file is just copied. In this case # a timer is alrea...
def _inotify_event(self, mask, name, target=None): """ Callback for inotify. """ if mask & INotify.MODIFY and self._bursthandler.is_growing(name): # A file was modified. Do this check as fast as we can because the # events may come in bursts when a file is just copied. In this case # a timer is already active and we ca...
448,405
def __init__(self, dbdir, scheduler=None): log.info('start beacon') try: self.ipc = kaa.rpc.Server('beacon') except IOError, e: kaa.beacon.thumbnail.thumbnail.disconnect() log.error('beacon: %s' % e) time.sleep(0.1) sys.exit(0)
def __init__(self, dbdir, scheduler=None): log.info('start beacon') try: self.ipc = kaa.rpc.Server('beacon') except IOError, e: kaa.beacon.thumbnail.thumbnail.disconnect() log.error('beacon: %s' % e) time.sleep(0.1) sys.exit(0)
448,406
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
448,407
def watchConnection(self, connection, sockThread): sockThread.join() if(connection.closed): log(self, "%s's thread ended, connection was marked closed" % connection.user, 3) else: log(self, "%s's thread ended unexpectedly, cleaning up" % connection.user, 3) # send a quit message if(connection.type == self.IRC_Connectio...
def watchConnection(self, connection, sockThread): sockThread.join() if(connection.closed): log(self, "%s's thread ended, connection was marked closed" % connection.user, 3) else: log(self, "%s's thread ended unexpectedly, cleaning up" % connection.user, 3) # send a quit message if(connection.type == self.IRC_Connectio...
448,408
def watchConnection(self, connection, sockThread): sockThread.join() if(connection.closed): log(self, "%s's thread ended, connection was marked closed" % connection.user, 3) else: log(self, "%s's thread ended unexpectedly, cleaning up" % connection.user, 3) # send a quit message if(connection.type == self.IRC_Connectio...
def watchConnection(self, connection, sockThread): sockThread.join() if(connection.closed): log(self, "%s's thread ended, connection was marked closed" % connection.user, 3) else: log(self, "%s's thread ended unexpectedly, cleaning up" % connection.user, 3) # send a quit message if(connection.type == self.IRC_Connectio...
448,409
def removeUser(self, user): # perform all the cleanup that needs to be done to get a user out of the system log(self, "Removing %s from server" % user, 3) if(user in self.users): self.users.remove(user) else: log(self, "WARNING: %s wasn't in userlist" % user, 3) log(self, "Removing %s from channels %s" % (user, user.ch...
def removeUser(self, user): # perform all the cleanup that needs to be done to get a user out of the system log(self, "Removing %s from server" % user, 3) if(user in self.users): self.users.remove(user) else: log(self, "WARNING: %s wasn't in userlist" % user, 3) log(self, "Removing %s from channels %s" % (user, user.ch...
448,410
def sendMOTD(self, connection): msg = self.IRC_Message("001 :Welcome, %s" % connection.user.nick) # WTF: Unknown reply type msg.params.append(connection.user.nick) msg.prefix = self.hostname # stick this in there somewhere: CHANTYPES=#&+ PREFIX=(Naohv)$&@%+ CHANMODES=be,k,l,cimnpqstAKMNORS STATUSMSG=$&@%+ NETWORK=Nadru...
defconnection.send(msg.toString()) msg = self.IRC_Message("005 :are supported by this server") msg.prefix = self.hostname msg.params = [ connection.user.nick, "CHANTYPES=%s" % (self.chan_types), \ "PREFIX=(%s)%s" % (self.cuser_modes, self.cuser_sigils), \ "CHANMODES=%s" % (self.chan_modes), \ "NETWORK=%s" % (self.netw...
448,411
def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this me...
def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this me...
448,412
def removeUser(self, user): log(self, "Attempting to remove %s from %s" % (user, self), 3) for cuser in self.users: if(cuser.user == user): self.users.remove(cuser) log(self, "Removed %s from %s's userlist" % (cuser, self), 3) if(self in user.channels): user.channels.remove(self) log(self, "Removed %s from %s's channel...
def removeUser(self, user): log(self, "Attempting to remove %s from %s" % (user, self), 3) for cuser in self.users: if(cuser.user == user): self.users.remove(cuser) log(self, "Removed %s from %s's userlist" % (cuser, self), 3) if(self in user.channels): user.channels.remove(self) log(self, "Removed %s from %s's channel...
448,413
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
448,414
def addUser(self, user): if(self.findCUser(user.nick) == None): self.users.append(self.Channel_User(user)) user.channels.append(self) return True return False
def addUser(self, user): if(self.findCUser(user.nick) == None): cuser = self.Channel_User(user) self.users.append(cuser) log(self, "Added cuser %s to %s's userlist" % (cuser, self), 3) user.channels.append(self) return True return False
448,415
def removeUser(self, user): for cuser in self.users: if(cuser.user == user): self.users.remove(cuser) user.channels.remove(self)
def removeUser(self, user): for cuser in self.users: if(cuser.user == user): self.users.remove(cuser) user.channels.remove(self)
448,416
def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this me...
def watchConnection(self, connection, sockThread): sockThread.join() if(connection.closed): log(self, "%s's thread ended, connection was marked closed" % connection.user, 3) else: log(self, "%s's thread ended unexpectedly, cleaning up" % connection.user, 3) # send a quit message if(connection.type == self.IRC_Connectio...
448,417
def checkClientNick(self, connection, nick): if(self.findUser(nick)): # check that nobody's taken the nick already errmsg = self.IRC_Message("433 :Nickname is already in use") errmsg.prefix = self.hostname if(connection.user.nick): errmsg.params = [connection.user.nick, nick] else: errmsg.params = ["*", nick] connectio...
def checkClientNick(self, connection, nick): if(self.findUser(nick)): # check that nobody's taken the nick already errmsg = self.IRC_Message("433 :Nickname is already in use") errmsg.prefix = self.hostname if(connection.user and connection.user.nick): errmsg.params = [connection.user.nick, nick] else: errmsg.params = [...
448,418
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
448,419
def readPrefs(self, filename="CCServer.conf"): global logging log(self, "reading %s" % filename) prefsFile = file(filename, 'r') prefsData = prefsFile.read() prefsFile.close() newPrefs = parseToDict(prefsData, ':', '\n') for pref in newPrefs: newPrefs[pref] = newPrefs[pref].strip() if(newPrefs[pref].isdigit()): newPref...
def readPrefs(self, filename="CCServer.conf"): global logging log(self, "reading %s" % filename) prefsFile = file(filename, 'r') prefsData = prefsFile.read() prefsFile.close() newPrefs = parseToDict(prefsData, ':', '\n') for pref in newPrefs: newPrefs[pref] = newPrefs[pref].strip() if(newPrefs[pref].isdigit()): newPref...
448,420
def handleReq(self, sock, addr, method, resource, protocol, headers, body, getOptions): #lazy parsing of escape sequences :P resource = resource.replace("%20", ' ') if(self.redirects.has_key(resource)): self.writeHTTP(sock, 301, {"Location": self.redirects[resource]}, "301 Redirect") log(self, "redirected %s from %s to...
def handleReq(self, sock, addr, method, resource, protocol, headers, body, getOptions): #lazy parsing of escape sequences :P resource = resource.replace("%20", ' ') if(self.redirects.has_key(resource)): self.writeHTTP(sock, 301, {"Location": self.redirects[resource]}, "301 Redirect") log(self, "redirected %s from %s to...
448,421
def checkClientNick(self, connection, nick): if(self.findUser(nick)): # check that nobody's taken the nick already errmsg = self.IRC_Message("433 :Nickname is already in use") errmsg.prefix = self.hostname if(connection.user and connection.user.nick): errmsg.params = [connection.user.nick, nick] else: errmsg.params = [...
def checkClientNick(self, connection, nick): if(self.findUser(nick)): # check that nobody's taken the nick already self.sendReply(connection, 433, [nick]) return False for char in IRC_Server.cuser_sigils + IRC_Server.chan_types + "!@": #need to include these symbols, as they're nick!user@host delimiters if char in nick...
448,422
def addUser(self, user): self.users.append(self.Channel_User(user)) user.channels.append(self)
def addUser(self, user): self.users.append(self.Channel_User(user)) user.channels.append(self)
448,423
def removeUser(self, user): for cuser in self.users: if(cuser.user == user): self.users.remove(cuser) break user.channels.remove(self)
def removeUser(self, user): for cuser in self.users: if(cuser.user == user): self.users.remove(cuser) user.channels.remove(self)
448,424
def removeUser(self, user): # perform all the cleanup that needs to be done to get a user out of the system if(not user): return self.users.remove(user) for channel in user.channels: channel.removeUser(user) if(user.connection.type == self.IRC_Connection.CLIENT): user.connection.sock.close() user.connection.closed = Tr...
def removeUser(self, user): # perform all the cleanup that needs to be done to get a user out of the system if(user in self.users): self.users.remove(user) for channel in user.channels: channel.removeUser(user) if(user.connection.type == self.IRC_Connection.CLIENT): user.connection.sock.close() user.connection.closed =...
448,425
def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this me...
def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this me...
448,426
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
448,427
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
448,428
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
448,429
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') args.reverse() if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.com...
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.command = args.pop...
448,430
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') args.reverse() if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.com...
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') args.reverse() if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop(0)[1:] # a command is required for all messages self.co...
448,431
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') args.reverse() if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.com...
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') args.reverse() if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.com...
448,432
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') args.reverse() if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.com...
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') args.reverse() if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.com...
448,433
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') args.reverse() if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.com...
def __init__(self, message): self.prefix = str() self.command = str() self.params = list() self.trail = str() args = message.split(' ') if(message.startswith(':')): # the prefix, if present, indicates the origin of the message self.prefix = args.pop()[0:] # a command is required for all messages self.command = args.pop...
448,434
def __init__(self, connection, user="", hopcount = 0): self.username = str() self.hostname = str() args = user.split("!") self.nick = args[0] if(len(args) == 2): args = args[1].split("@") self.username = args[0] if(len(args) == 2): self.hostname = args[1] self.realname = str() self.servername = str() self.flags = "" se...
def __init__(self, connection, user="", hopcount = 0): self.username = str() self.hostname = str() args = user.split("!") self.nick = args[0] if(len(args) == 2): args = args[1].split("@") self.username = args[0] if(len(args) == 2): self.hostname = args[1] self.realname = str() self.servername = str() self.flags = IRC_S...
448,435
def __repr__(self): return "<%s +%s>" % (self.fullUser(), self.flags)
def __repr__(self): return "<%s +%s>" % (self.fullUser(), self.flags)
448,436
def __init__(self, user): self.user = user self.flags = ""
def __init__(self, user): self.user = user self.flags = ""
448,437
def sigil(self): if(self.flags.find("v") != -1): return "+" if(self.flags.find("o") != -1): return "@" return ""
def sigil(self): if('v' in self.flags): return "+" if(self.flags.find("o") != -1): return "@" return ""
448,438
def sigil(self): if(self.flags.find("v") != -1): return "+" if(self.flags.find("o") != -1): return "@" return ""
def sigil(self): if(self.flags.find("v") != -1): return "+" if('o' in self.flags): return "@" return ""
448,439
def __init__(self, name): self.name = name self.topic = str() self.flags = "" self.users = list()
def __init__(self, name): self.name = name self.topic = str() self.flags = IRC_Server.IRC_Flags() self.users = list()
448,440
def __repr__(self): return "<%s +%s>" % (self.name, self.flags)
def __repr__(self): return "<%s +%s>" % (self.name, self.flags)
448,441
def broadcast(self, msg, exclude=None): connections = list() for cuser in self.users: connection = cuser.user.connection if((not connection in connections) and connection != exclude): connections.append(connection) for connection in connections: connection.send(msg.toString())
def findCUser(self, nick): nick = nick.split("!")[0] for cuser in self.users: if(cuser.user.nick == nick): return cuser return None def broadcast(self, msg, exclude=None, localOnly=False): connections = list() for cuser in self.users: connection = cuser.user.connection if((not connection in connections) and connection...
448,442
def broadcast(self, msg, exclude=None): connections = list() for cuser in self.users: connection = cuser.user.connection if((not connection in connections) and connection != exclude): connections.append(connection) for connection in connections: connection.send(msg.toString())
def broadcast(self, msg, exclude=None): connections = list() for cuser in self.users: connection = cuser.user.connection if((not connection in connections) and connection != exclude and \ (localOnly == False or connection.type == IRC_Server.IRC_Connection.CLIENT)): connections.append(connection) for connection in conne...
448,443
def findUser(self, nick): log(self, "Looking for %s in %s" % (nick, self.users), 3) nick = nick.split("!")[0] for user in self.users: if(user.nick == nick): log(self, "Found user %s" % user, 3) return user log(self, "Didn't find user", 3) return None
def findUser(self, nick): log(self, "Looking for %s in %s" % (nick, self.users), 4) nick = nick.split("!")[0] for user in self.users: if(user.nick == nick): log(self, "Found user %s" % user, 3) return user log(self, "Didn't find user", 3) return None
448,444
def findUser(self, nick): log(self, "Looking for %s in %s" % (nick, self.users), 3) nick = nick.split("!")[0] for user in self.users: if(user.nick == nick): log(self, "Found user %s" % user, 3) return user log(self, "Didn't find user", 3) return None
def findUser(self, nick): log(self, "Looking for %s in %s" % (nick, self.users), 3) nick = nick.split("!")[0] for user in self.users: if(user.nick == nick): log(self, "Found user %s" % user, 4) return user log(self, "Didn't find user", 3) return None
448,445
def findUser(self, nick): log(self, "Looking for %s in %s" % (nick, self.users), 3) nick = nick.split("!")[0] for user in self.users: if(user.nick == nick): log(self, "Found user %s" % user, 3) return user log(self, "Didn't find user", 3) return None
def findUser(self, nick): log(self, "Looking for %s in %s" % (nick, self.users), 3) nick = nick.split("!")[0] for user in self.users: if(user.nick == nick): log(self, "Found user %s" % user, 3) return user log(self, "Didn't find user", 4) return None
448,446
def findChannel(self, name): log(self, "Looking for %s in %s" % (name, self.channels), 3) for channel in self.channels: if(channel.name == name): log(self, "Found channel %s" % channel, 3) return channel log(self, "Didn't find channel", 3) return None
def findChannel(self, name): log(self, "Looking for %s in %s" % (name, self.channels), 4) for channel in self.channels: if(channel.name == name): log(self, "Found channel %s" % channel, 3) return channel log(self, "Didn't find channel", 3) return None
448,447
def findChannel(self, name): log(self, "Looking for %s in %s" % (name, self.channels), 3) for channel in self.channels: if(channel.name == name): log(self, "Found channel %s" % channel, 3) return channel log(self, "Didn't find channel", 3) return None
def findChannel(self, name): log(self, "Looking for %s in %s" % (name, self.channels), 3) for channel in self.channels: if(channel.name == name): log(self, "Found channel %s" % channel, 4) return channel log(self, "Didn't find channel", 3) return None
448,448
def findChannel(self, name): log(self, "Looking for %s in %s" % (name, self.channels), 3) for channel in self.channels: if(channel.name == name): log(self, "Found channel %s" % channel, 3) return channel log(self, "Didn't find channel", 3) return None
def findChannel(self, name): log(self, "Looking for %s in %s" % (name, self.channels), 3) for channel in self.channels: if(channel.name == name): log(self, "Found channel %s" % channel, 3) return channel log(self, "Didn't find channel", 4) return None
448,449
def removeUser(self, user): # perform all the cleanup that needs to be done to get a user out of the system self.connections.remove(user.connection) self.users.remove(user) for channel in user.channels: channel.removeUser(user) if(user.connection.type == self.IRC_Connection.CLIENT): user.connection.sock.close() self.co...
def removeUser(self, user): # perform all the cleanup that needs to be done to get a user out of the system if(not user): return self.users.remove(user) for channel in user.channels: channel.removeUser(user) if(user.connection.type == self.IRC_Connection.CLIENT): user.connection.sock.close() self.connections.remove(use...
448,450
def localBroadcast(self, msg, relUser): localUsers = list() for channel in relUser.channels: for cuser in channel.users: if((not cuser.user in localUsers) and cuser.user.connection.type == self.IRC_Connection.CLIENT): localUsers.append(cuser.user) for user in localUsers: user.connection.send(msg.toString())
def localBroadcast(self, msg, relUser, excludeConn=None): localUsers = list() for channel in relUser.channels: for cuser in channel.users: if((not cuser.user in localUsers) and cuser.user.connection.type == self.IRC_Connection.CLIENT): localUsers.append(cuser.user) for user in localUsers: user.connection.send(msg.toStr...
448,451
def localBroadcast(self, msg, relUser): localUsers = list() for channel in relUser.channels: for cuser in channel.users: if((not cuser.user in localUsers) and cuser.user.connection.type == self.IRC_Connection.CLIENT): localUsers.append(cuser.user) for user in localUsers: user.connection.send(msg.toString())
def localBroadcast(self, msg, relUser): localUsers = list() for channel in relUser.channels: for cuser in channel.users: user = cuser.user connection = cuser.user.connection if((not user in localUsers) and connection.type == self.IRC_Connection.CLIENT and connection != excludeConn): localUsers.append(user) for user in ...
448,452
def findCUser(self, nick): nick = nick.split("!")[0] for cuser in self.users: if(cuser.user.nick == nick): return cuser return None
def findCUser(self, nick): nick = nick.split("!")[0] for cuser in self.users: if(cuser.user.nick.lower() == nick.lower()): return cuser return None
448,453
def findUser(self, nick): log(self, "Looking for %s in %s" % (nick, self.users), 4) nick = nick.split("!")[0] for user in self.users: if(user.nick == nick): log(self, "Found user %s" % user, 4) return user log(self, "Didn't find user", 4) return None
def findUser(self, nick): log(self, "Looking for %s in %s" % (nick, self.users), 4) nick = nick.split("!")[0] for user in self.users: if(user.nick.lower() == nick.lower()): log(self, "Found user %s" % user, 4) return user log(self, "Didn't find user", 4) return None
448,454
def findChannel(self, name): log(self, "Looking for %s in %s" % (name, self.channels), 4) for channel in self.channels: if(channel.name == name): log(self, "Found channel %s" % channel, 4) return channel log(self, "Didn't find channel", 4) return None
def findChannel(self, name): log(self, "Looking for %s in %s" % (name, self.channels), 4) for channel in self.channels: if(channel.name.lower() == name.lower()): log(self, "Found channel %s" % channel, 4) return channel log(self, "Didn't find channel", 4) return None
448,455
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
def sendServerData(self, connection): # respond with our own PASS, SERVER combo passMsg = self.IRC_Message("PASS") passMsg.prefix = self.hostname passMsg.params = [self.prefs["server_password"]] connection.send(passMsg.toString()) servMsg = self.IRC_Message("SERVER") servMsg.params = [self.hostname, "1"] servMsg.trail ...
448,456
def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this me...
def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this me...
448,457
def xf_escape_character(text): print("hello {0} {1}".format(character, replacement), file=sys.stderr) print("text replaced with {0!r}".format(text.replace(character, replacement)), file=sys.stderr) return text.replace(character, replacement)
def xf_escape_character(text): return text.replace(character, replacement)
448,458
def update_text(self, string=None): if not string is None: self.text = "%s%s" % (self.text, string) self.label.set_text(self.text) else: self.label.set_text("") self.label.emit("text-changed")
def update_text(self, string=None): if not string is None: self.text = "%s%s" % (self.label.get_text(), string) self.label.set_text(self.text) else: self.label.set_text("") self.label.emit("text-changed")
448,459
def key_press(self, reply): if reply.category != record.FromServer: return if reply.client_swapped: print "* received swapped protocol data, cowardly ignored" return if not len(reply.data) or ord(reply.data[0]) < 2: # not an event return data = reply.data key = '' mod = '' while len(data): event, data = rq.EventField(N...
def key_press(self, reply): if reply.category != record.FromServer: return if reply.client_swapped: self.logger.warning("* received swapped protocol data, cowardly ignored") return if not len(reply.data) or ord(reply.data[0]) < 2: # not an event return data = reply.data key = '' mod = '' while len(data): event, data = ...
448,460
def key_press(self, reply): if reply.category != record.FromServer: return if reply.client_swapped: print "* received swapped protocol data, cowardly ignored" return if not len(reply.data) or ord(reply.data[0]) < 2: # not an event return data = reply.data key = '' mod = '' while len(data): event, data = rq.EventField(N...
def key_press(self, reply): if reply.category != record.FromServer: return if reply.client_swapped: print "* received swapped protocol data, cowardly ignored" return if not len(reply.data) or ord(reply.data[0]) < 2: # not an event return data = reply.data key = '' mod = '' while len(data): event, data = rq.EventField(N...
448,461
def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return
def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return
448,462
def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return
def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return
448,463
def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return
def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return
448,464
def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return
def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return
448,465
def key_press(self, reply): if reply.category != record.FromServer: return if reply.client_swapped: self.logger.warning("* received swapped protocol data, cowardly ignored") return if not len(reply.data) or ord(reply.data[0]) < 2: # not an event return data = reply.data key = '' mod = '' while len(data): event, data = ...
def key_press(self, reply): if reply.category != record.FromServer: return if reply.client_swapped: self.logger.warning("* received swapped protocol data, cowardly ignored") return if not len(reply.data) or ord(reply.data[0]) < 2: # not an event return data = reply.data key = '' mod = '' while len(data): event, data = ...
448,466
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,467
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,468
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,469
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,470
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,471
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,472
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,473
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,474
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only o...
448,475
def load_state(self): """Load stored options""" options = None try: f = open(self.STATE_FILE, 'r') try: options = pickle.load(f) except: f.close() except IOError: self.logger.error("file %s does not exists." % STATE_FILE) return options
def load_state(self): """Load stored options""" options = None try: f = open(self.STATE_FILE, 'r') try: options = pickle.load(f) except: f.close() except IOError: self.logger.error("file %s does not exists." % self.STATE_FILE) return options
448,476
def store_state(self, options): """Store options""" try: f = open(self.STATE_FILE, 'w') try: pickle.dump(options, f) except: f.close() except IOError: self.logger.error("Cannot open %s." % STATE_FILE)
def store_state(self, options): """Store options""" try: f = open(self.STATE_FILE, 'w') try: pickle.dump(options, f) except: f.close() except IOError: self.logger.error("Cannot open %s." % STATE_FILE)
448,477
def __init__(self, file): # Parse the header file.seek(0) assert file.read(4) == "PTCH" # Magic ## # Sizes # - patchSize: Size of the entire patch data, not including the 'PTCH' signature itself # - sizeBefore: Size of the file before patching # - sizeAfter: Size of the file after patching self.patchSize, self.sizeBef...
def __init__(self, file): # Parse the header file.seek(0) assert file.read(4) == "PTCH" # Magic ## # Sizes # - patchSize: Size of the entire patch data, not including the 'PTCH' signature itself # - sizeBefore: Size of the file before patching # - sizeAfter: Size of the file after patching self.patchSize, self.sizeBef...
448,478
def generate(env): """Add Builders and construction variables for render to an Environment.""" RenderAction = SCons.Action.Action('$RENDERCOM', '$RENDERCOMSTR') RenderTargetScanner = SCons.Scanner.Base(name = "renderTargetScanner", function = renderTargetScanner, skeys = ['.t2t']) env['BUILDERS']['RENDER'] = SCons.Buil...
def generate(env): """Add Builders and construction variables for render to an Environment.""" RenderAction = SCons.Action.Action('$RENDERCOM', '$RENDERCOMSTR') RenderTargetScanner = SCons.Scanner.Base(name = "renderTargetScanner", function = renderTargetScanner, skeys = ['.t2t']) env['BUILDERS']['RENDER'] = SCons.Buil...
448,479
def generate(env): """Add Builders and construction variables for t2tbhtml to an Environment.""" env['BUILDERS']['T2TBHTML'] = SCons.Builder.Builder(\ action = 'txt2tags -q -H -t html -i $SOURCE -o $TARGET' , suffix = '.bhtml' , src_suffix = '.t2t' , source_scanner = SCons.Tool.SourceFileScanner) T2tbhtmlSourceScanner ...
def generate(env): """Add Builders and construction variables for t2tbhtml to an Environment.""" env['BUILDERS']['T2TBHTML'] = SCons.Builder.Builder(\ action = '$T2TBHTML $SOURCE $TARGET' , suffix = '.bhtml' , src_suffix = '.t2t' , source_scanner = SCons.Tool.SourceFileScanner) T2tbhtmlSourceScanner = SCons.Scanner.Bas...
448,480
def generate(env): """Add Builders and construction variables for t2tbhtml to an Environment.""" env['BUILDERS']['T2TBHTML'] = SCons.Builder.Builder(\ action = 'txt2tags -q -H -t html -i $SOURCE -o $TARGET' , suffix = '.bhtml' , src_suffix = '.t2t' , source_scanner = SCons.Tool.SourceFileScanner) T2tbhtmlSourceScanner ...
def generate(env): """Add Builders and construction variables for t2tbhtml to an Environment.""" env['BUILDERS']['T2TBHTML'] = SCons.Builder.Builder(\ action = 'txt2tags -q -H -t html -i $SOURCE -o $TARGET' , suffix = '.bhtml' , src_suffix = '.t2t' , source_scanner = SCons.Tool.SourceFileScanner , target_scanner = T2tb...
448,481
def renderTargetScanner(node, env, path): return [os.path.join(env['TOP'], env['RENDER'])]
def renderTargetScanner(node, env, path): return [os.path.join(env['TOP'], env['RENDERTEMPLATE']), os.path.join(env['TOP'], env['RENDER'])]
448,482
def haskellAutoEmitter(target, source, env): base = SCons.Util.splitext(str(source[0]))[0] contents = source[0].get_contents() target.append(base + '.o') if main_re.findall(contents): target.append(base) return target, source
def haskellAutoEmitter(target, source, env): base = SCons.Util.splitext(str(source[0]))[0] contents = source[0].get_contents() target.append(base + '.o') return target, source
448,483
def _command_list(commands): kinds = {} for cmd, (mod, kind, help) in commands.iteritems(): kinds.setdefault(kind, {})[cmd] = help for kind in _kind_order: kind = _kinds[kind] yield kind, sorted(kinds[kind].iteritems())
def _command_list(commands): kinds = {} for cmd, (mod, kind, help) in commands.iteritems(): kinds.setdefault(kind, {})[cmd] = help for kind in _kind_order: kind = _kinds[kind] try: yield kind, sorted(kinds[kind].iteritems()) except KeyError: pass
448,484
def load(self): """Load the whole configuration in __cache unless it has been done already.""" if self.__cache is not None: return self.__cache = {} lines = Run('git', 'config', '--null', '--list' ).discard_exitcode().raw_output() for line in filter(None, lines.split('\0')): key, value = line.split('\n', 1) self.__cach...
def load(self): """Load the whole configuration in __cache unless it has been done already.""" if self.__cache is not None: return self.__cache = self.__defaults lines = Run('git', 'config', '--null', '--list' ).discard_exitcode().raw_output() for line in filter(None, lines.split('\0')): key, value = line.split('\n', 1...
448,485
def get(self, name): self.load() if name not in self.__cache: self.__cache[name] = [self.__defaults.get(name, None)] return self.__cache[name][-1]
def get(self, name): self.load() if name not in self.__cache: self.__cache[name] = [self.__defaults.get(name, None)] return self.__cache[name][-1]
448,486
def __send_message(from_addr, to_addr_list, msg, options): """Message sending dispatcher. """ smtpserver = options.smtp_server or config.get('stgit.smtpserver') if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information...
def __send_message(type, tmpl, options, *args): """Message sending dispatcher. """ smtpserver = options.smtp_server or config.get('stgit.smtpserver') if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information) __send_me...
448,487
def __send_message(from_addr, to_addr_list, msg, options): """Message sending dispatcher. """ smtpserver = options.smtp_server or config.get('stgit.smtpserver') if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information...
def__send_message(from_addr,to_addr_list,msg,options):"""Messagesendingdispatcher."""smtpserver=options.smtp_serverorconfig.get('stgit.smtpserver')ifsmtpserver.startswith('/'):#Usethesendmailtool__send_message_sendmail(smtpserver,msg)else:#UsetheSMTPserver(wehavehostandportinformation)__send_message_smtp(smtpserver,fro...
448,488
def __send_message(from_addr, to_addr_list, msg, options): """Message sending dispatcher. """ smtpserver = options.smtp_server or config.get('stgit.smtpserver') if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information...
def __send_message(from_addr, to_addr_list, msg, options): """Message sending dispatcher. """ smtpserver = options.smtp_server or config.get('stgit.smtpserver') if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg_str) else: # Use the SMTP server (we have host and port informa...
448,489
def __send_message(from_addr, to_addr_list, msg, options): """Message sending dispatcher. """ smtpserver = options.smtp_server or config.get('stgit.smtpserver') if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information...
def __send_message(from_addr, to_addr_list, msg, options): """Message sending dispatcher. """ smtpserver = options.smtp_server or config.get('stgit.smtpserver') if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information...
448,490
def __pick_commit(commit_id, patchname, options): """Pick a commit id. """ commit = git.Commit(commit_id) if options.name: patchname = options.name elif patchname and options.revert: patchname = 'revert-' + patchname if patchname: patchname = find_patch_name(patchname, crt_series.patch_exists) if options.parent: pare...
def __pick_commit(commit_id, patchname, options): """Pick a commit id. """ commit = git.Commit(commit_id) if options.name: patchname = options.name elif patchname and options.revert: patchname = 'revert-' + patchname if patchname: patchname = find_patch_name(patchname, crt_series.patch_exists) if options.parent: pare...
448,491
def __pick_commit(commit_id, patchname, options): """Pick a commit id. """ commit = git.Commit(commit_id) if options.name: patchname = options.name elif patchname and options.revert: patchname = 'revert-' + patchname if patchname: patchname = find_patch_name(patchname, crt_series.patch_exists) if options.parent: pare...
def __pick_commit(commit_id, patchname, options): """Pick a commit id. """ commit = git.Commit(commit_id) if options.name: patchname = options.name elif patchname and options.revert: patchname = 'revert-' + patchname if patchname: patchname = find_patch_name(patchname, crt_series.patch_exists) if options.parent: pare...
448,492
def patch_name_from_msg(msg): """Return a string to be used as a patch name. This is generated from the top line of the string passed as argument.""" if not msg: return None name_len = config.getint('stgit.namelength') if not name_len: name_len = 30 subject_line = msg.split('\n', 1)[0].lstrip().lower() return re.sub(...
def patch_name_from_msg(msg): """Return a string to be used as a patch name. This is generated from the top line of the string passed as argument.""" if not msg: return None name_len = config.getint('stgit.namelength') if not name_len: name_len = 30 subject_line = msg.split('\n', 1)[0].lstrip().lower() return re.sub(...
448,493
def __init__(self, stack, msg, discard_changes = False, allow_conflicts = False, allow_bad_head = False, check_clean_iw = None): """Create a new L{StackTransaction}.
def __init__(self, stack, msg, discard_changes = False, allow_conflicts = False, allow_bad_head = False, check_clean_iw = None): """Create a new L{StackTransaction}.
448,494
def write(msg): for pn, commit in self.__patches.iteritems(): if self.__stack.patches.exists(pn): p = self.__stack.patches.get(pn) if commit == None: p.delete() else: p.set_commit(commit, msg) else: self.__stack.patches.new(pn, commit, msg) self.__stack.patchorder.applied = self.__applied self.__stack.patchorder.unappl...
def write(msg): for pn, commit in self.__patches.iteritems(): if self.__stack.patches.exists(pn): p = self.__stack.patches.get(pn) if commit == None: p.delete() else: p.set_commit(commit, msg) else: self.__stack.patches.new(pn, commit, msg) self.__stack.patchorder.applied = self.__applied self.__stack.patchorder.unappl...
448,495
def update(): if comm: self.patches[pn] = comm if pn in self.hidden: x = self.hidden else: x = self.unapplied del x[x.index(pn)] self.applied.append(pn)
def update(): if comm: self.patches[pn] = comm if pn in self.hidden: x = self.hidden else: x = self.unapplied del x[x.index(pn)] self.applied.append(pn)
448,496
def update(): if comm: self.patches[pn] = comm if pn in self.hidden: x = self.hidden else: x = self.unapplied del x[x.index(pn)] self.applied.append(pn)
def update(): if comm: self.patches[pn] = comm if pn in self.hidden: x = self.hidden else: x = self.unapplied del x[x.index(pn)] self.applied.append(pn)
448,497
def update(): if comm: self.patches[pn] = comm if pn in self.hidden: x = self.hidden else: x = self.unapplied del x[x.index(pn)] self.applied.append(pn)
def update(): if comm: self.patches[pn] = comm if pn in self.hidden: x = self.hidden else: x = self.unapplied del x[x.index(pn)] self.applied.append(pn)
448,498
def allow_conflicts(trans): # As long as the topmost patch stays where it is, it's OK to # run "stg commit" with conflicts in the index. return len(trans.applied) >= 1
def allow_conflicts(trans): # As long as the topmost patch stays where it is, it's OK to # run "stg commit" with conflicts in the index. return len(trans.applied) >= 1
448,499