Updates for PEP8.
This commit is contained in:
parent
396501a0f4
commit
0afaac6633
15
varnish.py
15
varnish.py
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
"""Script to create a ACL file for inclusion within Varnish."""
|
||||||
|
|
||||||
import blocklist
|
import blocklist
|
||||||
import sys
|
import sys
|
||||||
|
@ -12,12 +13,16 @@ class VarnishBlockList(blocklist.BlockList):
|
||||||
print "\t\"%s\";" % address
|
print "\t\"%s\";" % address
|
||||||
print "}"
|
print "}"
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
blocklist = VarnishBlockList()
|
"""Main program loop."""
|
||||||
|
block_list = VarnishBlockList()
|
||||||
|
|
||||||
blocklist.read("http://server1.example.com/default/blocks.txt")
|
block_list.read("http://server1.example.com/default/blocks.txt")
|
||||||
blocklist.read("http://server2.example.com/default/blocks.txt")
|
block_list.read("http://server2.example.com/default/blocks.txt")
|
||||||
|
|
||||||
blocklist.export()
|
block_list.export()
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
Loading…
Reference in a new issue