Commits

Jason R. Coombs committed 5b460bc

Reorganized imports on scanner module

Comments (0)

Files changed (1)

jaraco/net/scanner.py

-#!python
-
-# $Id$
-
 """
-  scanner.py
+scanner.py
 
 TCP port scanning utility
 """
 
-import os, operator, sys
-import re, struct, socket, itertools
+import os
+import operator
+import sys
+import re
+import struct
+import socket
+import itertools
+import logging.handlers
 from optparse import OptionParser
 
 import inet
-from logging.handlers import TimedRotatingFileHandler
 
-import logging
 log = logging.getLogger('port scanner')
 
 def GetParser():
 	logbase = os.path.join(logdir, 'scan.log')
 	if not os.path.isdir(logdir):
 		os.makedirs(logdir)
-	logfilehandler = TimedRotatingFileHandler(logbase, when='d')
+	logfilehandler = logging.handlers.TimedRotatingFileHandler(
+		logbase, when='d')
 	logfilehandler.level = logging.INFO
 	handlerFormat = '[%(asctime)s] - %(levelname)s - [%(name)s] %(message)s'
 	formatter = logging.Formatter(handlerFormat)