def check_dir():
    """ Creates a directory for scan reports """
    try:
        os.makedirs(reports_dir)
        logger.info('Creating reports directory: %s', reports_dir)
    except OSError as e:
        if e.errno != errno.EEXIST:
            raise
def check_dir ( ) : try : os . makedirs ( reports_dir ) logger . info ( 'Creating reports directory: %s' , reports_dir ) except OSError as e : if e . errno != errno . EEXIST : raise
Creates a directory for scan reports