watchd: remove non-printable chars from logged response
This commit is contained in:
@@ -90,7 +90,8 @@ class WorkerJob():
|
||||
self.total_duration += int(duration*1000)
|
||||
cstats = "" if match == 'unknown' else ' c: %s;'%match
|
||||
torstats = "" if len(config.torhosts)==1 else ' tor: %s;'%tor
|
||||
_log('%s://%s;%s d: %.2f sec(s);%s; srv: %s; recv: %s' % (proto, self.proxy, cstats, duration, torstats, srv, recv), 'xxxxx')
|
||||
recvstats = "".join([x if x in string.printable and ord(x) > 32 else '.' for x in recv])
|
||||
_log('%s://%s;%s d: %.2f sec(s);%s srv: %s; recv: %s' % (proto, self.proxy, cstats, duration, torstats, srv, recvstats), 'xxxxx')
|
||||
except KeyboardInterrupt as e:
|
||||
raise e
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user