Skip to content

Commit

Permalink
Configuration File! v0.1.1a
Browse files Browse the repository at this point in the history
  • Loading branch information
integgroll committed Jan 26, 2012
1 parent ce10662 commit 8ee39f7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wharfwhacker.py
Expand Up @@ -12,11 +12,11 @@
from threading import Thread

class WharfWhacker:
def __init__(self):
def __init__(self, config_file = "wharfwhacker.conf"):
attributes = dict()

if os.path.isfile("wharfwhacker.conf"):
conf = file("wharfwhacker.conf","r").readlines()
if os.path.isfile(config_file):
conf = file(config_file,"r").readlines()
for line in conf:
line = line.rstrip()
if len(line)>0:
Expand Down Expand Up @@ -139,10 +139,10 @@ def add_iptable_rule(self,rule):


class Whacker():
def __init__(self):
def __init__(self, config_file = "wharfwhacker.conf"):
attributes = dict()
if os.path.isfile("wharfwhacker.conf"):
conf = file("wharfwhacker.conf","r").readlines()
if os.path.isfile(config_file):
conf = file(config_file,"r").readlines()
for line in conf:
line = line.rstrip()
if len(line)>0:
Expand Down

0 comments on commit 8ee39f7

Please sign in to comment.