Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
Fix typo in GC of firewall rules.
Browse files Browse the repository at this point in the history
Fixes: AttributeError: 'function' object has no attribute 'list', and actually triggers the deletion (previously wasn't doing anything).
  • Loading branch information
marccarre committed Jan 13, 2017
1 parent bbe3844 commit 03119e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scheduler/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ def _gc_compute_engine_instances(compute, project, zone, running):
return stopped

def _gc_firewall_rules(compute, project, running):
firewalls = compute.firewalls.list(project=project).execute()
firewalls = compute.firewalls().list(project=project).execute()
for firewall in firewalls['items']:
matches = FIRE_RE.match(firewall['name'])
if matches is None:
continue
if matches.group('build') in running:
continue
compute.firewalls.delete(project=project, firewall=firewall['name'])
compute.firewalls().delete(project=project, firewall=firewall['name']).execute()

0 comments on commit 03119e1

Please sign in to comment.