just to make a commit i removed some newlines... ;) testing the github mail service. it should send mail to linspector-commits@lists.linspector.org on every commit now.

This commit is contained in:
Johannes Findeisen 2013-06-27 08:38:55 +02:00
commit 209be5f76c

View file

@ -8,7 +8,6 @@ import struct
class Packet(object):
"""Creates ICMPv4 and v6 packets.
header
@ -101,7 +100,6 @@ class Packet(object):
self.type = None
self.code = None
def __repr__(self):
return "<ICMPv%s packet: type = %s, code = %s, data length = %s>" % \
(self.version, self.type, self.code, len(self.data))
@ -182,6 +180,7 @@ class PingResponse(object):
return "%d bytes from %s: id=%s, seq=%u, rtt=%.3f ms" % \
(self.bufferLength, self.address, self.ident, self.seq, self.rtt)
class PingService(Service):
def __init__(self, **kwargs):
super(PingService, self).__init__(**kwargs)
@ -205,7 +204,6 @@ class PingService(Service):
base_packet = Packet((8, 0))
seqNum = 0
## create ping packet
pdata = struct.pack("!HHd", processId, seqNum, time.time())
@ -246,6 +244,5 @@ class PingService(Service):
task._execute()
def create(kwargs):
return PingService(**kwargs)