@@ -39,7 +39,6 @@ from conpot.core.log_worker import LogWorker
3939from conpot .protocols .proxy .proxy import Proxy
4040from conpot .utils import ext_ip
4141from conpot .utils .greenlet import spawn_startable_greenlet
42- from conpot .utils import mac_addr
4342from conpot .utils .networking import fix_sslwrap
4443
4544logger = logging .getLogger ()
@@ -365,8 +364,6 @@ def main():
365364 if config .getboolean ("fetch_public_ip" , "enabled" ):
366365 public_ip = ext_ip .get_ext_ip (config )
367366
368-
369-
370367 for protocol_name , server_class in protocols .name_mapping .items ():
371368 protocol_template = os .path .join (
372369 root_template_directory , protocol_name , "{0}.xml" .format (protocol_name )
@@ -384,9 +381,7 @@ def main():
384381 if ast .literal_eval (
385382 dom_protocol .xpath ("//{0}/@enabled" .format (protocol_name ))[0 ]
386383 ):
387- host = dom_protocol .xpath ("//{0}/@host" .format (protocol_name ))[
388- 0
389- ]
384+ host = dom_protocol .xpath ("//{0}/@host" .format (protocol_name ))[0 ]
390385 # -- > Are we running on testing config?
391386 if "testing.cfg" in args .config :
392387 if "127." not in host :
@@ -405,15 +400,11 @@ def main():
405400 greenlet .link_exception (on_unhandled_greenlet_exception )
406401 servers .append ((server , greenlet ))
407402 logger .info (
408- "Found and enabled {} protocol." .format (
409- protocol_name , server
410- )
403+ "Found and enabled {} protocol." .format (protocol_name , server )
411404 )
412405 else :
413406 logger .info (
414- "{} available but disabled by configuration." .format (
415- protocol_name
416- )
407+ "{} available but disabled by configuration." .format (protocol_name )
417408 )
418409 else :
419410 logger .debug (
@@ -430,9 +421,7 @@ def main():
430421 # TODO: Line up Proxy init with other protocols
431422 template_proxy = os .path .join (root_template_directory , "proxy" , "proxy.xml" )
432423 if os .path .isfile (template_proxy ):
433- xsd_file = os .path .join (
434- os .path .dirname (inspect .getfile (Proxy )), "proxy.xsd"
435- )
424+ xsd_file = os .path .join (os .path .dirname (inspect .getfile (Proxy )), "proxy.xsd" )
436425 validate_template (template_proxy , xsd_file )
437426 dom_proxy = etree .parse (template_proxy )
438427 if dom_proxy .xpath ("//proxies" ):
0 commit comments