Commit 7f0709df authored by Jos Schellevis's avatar Jos Schellevis

(proxy) add path for deteting old acl files

parent 82f33c6c
......@@ -54,9 +54,9 @@ if os.path.exists(acl_config_fn):
f = urllib2.urlopen(cnf.get(section,'url'),timeout = acl_max_timeout)
with open('%s/%s'%(acl_target_dir,section), "wb") as code:
code.write(f.read())
# if disabled try to remove old file
elif cnf.get(section,'enabled')=='0':
# if disabled or not 1 try to remove old file
elif cnf.get(section,'enabled')!='1':
try:
os.remove(section)
os.remove(acl_target_dir+'/'+section)
except OSError:
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment