Skip to content

Commit

Permalink
Fixes for case insensitive systems, fix for Cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
dvershinin committed Apr 28, 2022
1 parent 7b3b78d commit 7f3b096
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cds/CloudflareWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']))
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fds/fds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7f3b096

Please sign in to comment.