Skip to content

Commit

Permalink
abort set_parameters if changes are not allowed by config
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasV committed Mar 1, 2015
1 parent 7a9141e commit e9b06f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/network.py
Expand Up @@ -243,6 +243,9 @@ def set_parameters(self, host, port, protocol, proxy, auto_connect):
self.config.set_key('auto_cycle', auto_connect, True)
self.config.set_key("proxy", proxy_str, True)
self.config.set_key("server", server_str, True)
# abort if changes were not allowed by config
if self.config.get('server') != server_str or self.config.get('proxy') != proxy:
return

if self.proxy != proxy or self.protocol != protocol:
print_error('restarting network')
Expand Down

0 comments on commit e9b06f4

Please sign in to comment.