From: Michal 'vorner' Vaner Date: Tue, 11 Jun 2013 09:01:15 +0000 (+0200) Subject: [2922] Wrap some long lines X-Git-Tag: bind10-1.2.0beta1-release~406^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7035e189a7f94e8284c1da4eb538e6db24fafca4;p=thirdparty%2Fkea.git [2922] Wrap some long lines --- diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in index c6ccff368f..135ae8a29c 100755 --- a/src/bin/msgq/msgq.py.in +++ b/src/bin/msgq/msgq.py.in @@ -66,7 +66,9 @@ if "B10_FROM_BUILD" in os.environ: else: PREFIX = "@prefix@" DATAROOTDIR = "@datarootdir@" - SPECFILE_PATH = "@datadir@/@PACKAGE@".replace("${datarootdir}", DATAROOTDIR).replace("${prefix}", PREFIX) + SPECFILE_PATH = "@datadir@/@PACKAGE@".replace("${datarootdir}", + DATAROOTDIR). \ + replace("${prefix}", PREFIX) SPECFILE_LOCATION = SPECFILE_PATH + "/msgq.spec" class MsgQReceiveError(Exception): pass @@ -354,7 +356,8 @@ class MsgQ: def register_socket(self, newsocket): """ - Internal function to insert a socket. Used by process_accept and some tests. + Internal function to insert a socket. Used by process_accept and some + tests. """ self.sockets[newsocket.fileno()] = newsocket lname = self.newlname() @@ -610,7 +613,8 @@ class MsgQ: This is done by using an increasing counter and the current time.""" self.connection_counter += 1 - return "%x_%x@%s" % (time.time(), self.connection_counter, self.hostname) + return "%x_%x@%s" % (time.time(), self.connection_counter, + self.hostname) def process_command_ping(self, sock, routing, data): self.sendmsg(sock, { CC_HEADER_TYPE : CC_COMMAND_PONG }, data) @@ -885,7 +889,8 @@ if __name__ == "__main__": a valid port number. Used by OptionParser() on startup.""" intval = int(value) if (intval < 0) or (intval > 65535): - raise OptionValueError("%s requires a port number (0-65535)" % opt_str) + raise OptionValueError("%s requires a port number (0-65535)" % + opt_str) parser.values.msgq_port = intval # Parse any command-line options. diff --git a/src/bin/msgq/tests/msgq_test.py b/src/bin/msgq/tests/msgq_test.py index a663843318..2be47d0731 100644 --- a/src/bin/msgq/tests/msgq_test.py +++ b/src/bin/msgq/tests/msgq_test.py @@ -64,7 +64,8 @@ class TestSubscriptionManager(unittest.TestCase): for s in socks: self.sm.subscribe("a", "*", s) self.sm.unsubscribe("a", "*", 's3') - self.assertEqual(self.sm.find_sub("a", "*"), [ 's1', 's2', 's4', 's5' ]) + self.assertEqual(self.sm.find_sub("a", "*"), + [ 's1', 's2', 's4', 's5' ]) def test_unsubscribe_all(self): self.sm.subscribe('g1', 'i1', 's1') @@ -799,9 +800,11 @@ class SendNonblock(unittest.TestCase): send_exception is raised by BadSocket. """ (write, read) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM) - (control_write, control_read) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM) + (control_write, control_read) = socket.socketpair(socket.AF_UNIX, + socket.SOCK_STREAM) badwrite = BadSocket(write, raise_on_send, send_exception) - self.do_send(badwrite, read, control_write, control_read, expect_answer, expect_send_exception) + self.do_send(badwrite, read, control_write, control_read, + expect_answer, expect_send_exception) write.close() read.close() control_write.close()