Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when "restrict_networks" is null in config.yaml #22

Closed
jathanism opened this issue Mar 30, 2015 · 1 comment
Closed

Crash when "restrict_networks" is null in config.yaml #22

jathanism opened this issue Mar 30, 2015 · 1 comment
Labels

Comments

@jathanism
Copy link
Contributor

When restrict_networks is null in config.yaml, the following happens:

$ tail nsot.log
    main(sys.argv)
  File "/srv/nsot/envs/nsot/bin/nsot-server", line 37, in main
    settings.update_from_config(args.config)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/nsot/settings.py", line 33, in update_from_config
    value = override(value)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/nsot/settings.py", line 56, in override_restrict_networks
    new_values.append(ip_network(value))
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/ipaddress.py", line 148, in ip_network
    address)
ValueError: u'None' does not appear to be an IPv4 or IPv6 network

We should allow a null value to equate to the defaults, perhaps?

@jathanism
Copy link
Contributor Author

Oops, that's None as a string 'None'...

jathanism added a commit to jathanism/nsot that referenced this issue Mar 30, 2015
@jathanism jathanism added the bug label Mar 30, 2015
gmjosack added a commit that referenced this issue Mar 31, 2015
If restrict_networks is null, treat it as an empty list. (fix #22)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant