<s> try : <EOL> import datetime <EOL> from lib . active . corescanner import CoreScanner <EOL> from lib . core . config_parser import ConfigParser <EOL> from lib . core . exceptions import FlashLightExceptions <EOL> except ImportError , err : <EOL> from lib . core . core import Core <EOL> Core . print_error ( err ) <EOL> class PortScan ( CoreScanner ) : <EOL> def __init__ ( self , config_file , output_dir , ip_file_to_scan , nmap_optimize , scan_type ) : <EOL> self . _ip_file_to_scan = ip_file_to_scan <EOL> try : <EOL> self . _scan_options = ConfigParser . get_ports_options ( config_file ) <EOL> except Exception , err : <EOL> raise FlashLightExceptions ( str ( err ) ) <EOL> output_file = "<STR_LIT>" . format ( output_dir , scan_type , datetime . datetime . now ( ) . strftime ( "<STR_LIT>" ) ) <EOL> CoreScanner . __init__ ( self , self . _ip_file_to_scan . name , output_file , nmap_optimize , scan_type ) </s>
