diff --git a/cds/CloudflareWrapper.py b/cds/CloudflareWrapper.py index 81a0b16..5ab2d75 100644 --- a/cds/CloudflareWrapper.py +++ b/cds/CloudflareWrapper.py @@ -122,9 +122,7 @@ def block_ip(self, ip, comment='fds'): log.info('Skipped block in Cloudflare as it was not set up. Run fds config?') return nets = network_for_cloudflare(ip) - nets_len = len(nets) - if nets_len > 1: - log.info('Converted supplied network into {} entries for Cloudflare'.format(nets_len)) + # do not try to len(nets) as they may be not countable iterator! for a in self.all_accounts: for n in nets: log.info('Blocking {} in Cloudflare account {}'.format(ip, a['name'])) diff --git a/fds/config.py b/fds/config_funcs.py similarity index 100% rename from fds/config.py rename to fds/config_funcs.py diff --git a/fds/fds.py b/fds/fds.py index 2aa02ea..b4b83d7 100644 --- a/fds/fds.py +++ b/fds/fds.py @@ -10,7 +10,7 @@ from .Countries import Countries from .FirewallWrapper import FirewallWrapper from .__about__ import __version__ -from .config import action_config +from .config_funcs import action_config def commandline_arg(bytestring):