Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fcosantos committed Nov 24, 2023
1 parent fd8199d commit 93bb658
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/livehunt_network_watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def render_template(entity, domains):

for domain in domains:
domain_escaped = re.compile(r"[^[a-z\d]").sub("_", domain)
domain_escaped = re.compile(r'(_(?i:_)+)').sub('_', domain_escaped)
domain_escaped = re.compile(r"(_(?i:_)+)").sub("_", domain_escaped)

if not domain_escaped in escaped_domains:
escaped_domains[domain_escaped] = 0
Expand Down Expand Up @@ -141,7 +141,7 @@ async def upload_rulesets(queue):
print(f"Error updating {name}: {e}")

response = await result.json_async()
if response.get('error') != None:
if response.get("error") is not Non:
print(f'{name}: {response}')

print(f'Ruleset {name} [{RULESET_LINK}{task["id"]}] updated.')
Expand All @@ -165,7 +165,7 @@ async def upload_rulesets(queue):
print(f"Error saving {name}: {e}")

response = await result.json_async()
if response.get('error') != None:
if response.get("error") is not Non:
print(f'{name}: {response}')

print(f"Ruleset {name} [{RULESET_LINK}{result.id}] created.")
Expand All @@ -180,7 +180,7 @@ def load_bulk_file_domains(filename):

domains = []
with open(filename, encoding="utf-8") as bulk_file:
for line in bulk_file.read().split('\n'):
for line in bulk_file.read().split("\n"):
if not line:
continue
domains.append(line)
Expand Down

0 comments on commit 93bb658

Please sign in to comment.