Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-rakov committed Dec 22, 2016
1 parent e6b0e2e commit 794fa47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion development.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mako.directories = zapret2acl:templates
dns_hosts=
[email protected]:22
[email protected]:22
dns_update_cmd="./load_file_to_dns.sh"
dns_update_cmd=./load_file_to_dns.sh

###
# wsgi server configuration
Expand Down
10 changes: 4 additions & 6 deletions zapret2acl/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@ def dns_view(request):
f.close()
for server in request.registry.settings['dns_hosts'].split():
server,port=server.split(':')
status+=subprocess.check_output([
request.registry.settings['dns_update_cmd'],
server,
port,
'/tmp/dns'
],shell=True)
cmd="%s %s %s %s"%(request.registry.settings['dns_update_cmd'],server,port,'/tmp/dns')
status+=subprocess.check_output(
cmd
,shell=True)
except Exception,error:
status='Error sending acl to cisco'

Expand Down

0 comments on commit 794fa47

Please sign in to comment.