Commit c783abd1 authored by Mark Peek's avatar Mark Peek

pep8 changes

parent 39c18f0d
......@@ -13,7 +13,7 @@ class StderrLogger:
self.saved_stderr = sys.stderr
# ISO 8601
time_format = '%Y-%m-%dT%H:%M:%S'
time_format = '%Y-%m-%dT%H:%M:%S'
def log (self, *data):
self.saved_stderr.write ("%s %r\n" % (time.strftime (self.time_format), data))
......@@ -50,7 +50,7 @@ class Facility:
log (self.name, 'exception', coro.traceback_data())
class NoFacility:
def __call__ (self, *data):
log (*data)
......@@ -58,7 +58,7 @@ class NoFacility:
log ('exception', coro.traceback_data())
class StderrRedirector:
def __init__ (self):
self.log = Facility ('stderr')
......@@ -81,4 +81,3 @@ def set_logger (logger):
def log (*data):
the_logger.log (*data)
......@@ -18,6 +18,6 @@ class Logger:
self.magic,
struct.pack ('>I', len(data)),
data
)
)
)
self.file.flush()
......@@ -68,7 +68,7 @@ def main (addr):
if __name__ == '__main__':
import argparse
ap = argparse.ArgumentParser (description = 'shrapnel back door client')
ap = argparse.ArgumentParser (description='shrapnel back door client')
ap.add_argument ('addr', help='server address', default='127.0.0.1:23', metavar="(HOST:PORT)|PATH")
args = ap.parse_args()
if ':' in args.addr:
......
......@@ -167,7 +167,7 @@ def dump_hex (s):
class mysql_client:
def __init__ (self, username, password, address=('127.0.0.1', 3306),
debug = 0, timeout=None, connect_timeout=None):
debug=0, timeout=None, connect_timeout=None):
# remember this for reconnect
self.username = username
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment