diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-08-24 10:50:43 -0700 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-08-24 10:50:43 -0700 |
| commit | c44e65bd3ffc2c342c96c7a12dd2fa4f5880a841 (patch) | |
| tree | 5a8f37e2670853611302204d181b3ed02134ef6e | |
| parent | c8434f3b350527ddf82a20c7a7a08f1bc34966c2 (diff) | |
| parent | f850d14d6690d3b713be545e9f57623615aa7304 (diff) | |
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
| -rwxr-xr-x | tools/quagga-reload.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/quagga-reload.py b/tools/quagga-reload.py index d3b06daba2..1744a13365 100755 --- a/tools/quagga-reload.py +++ b/tools/quagga-reload.py @@ -468,16 +468,16 @@ if __name__ == '__main__': # Verify that 'service integrated-vtysh-config' is configured vtysh_filename = '/etc/quagga/vtysh.conf' - fh = open(vtysh_filename, 'r') service_integrated_vtysh_config = False - for line in fh.readlines(): - line = line.strip() + if os.path.isfile(vtysh_filename): + with open(vtysh_filename, 'r') as fh: + for line in fh.readlines(): + line = line.strip() - if line == 'service integrated-vtysh-config': - service_integrated_vtysh_config = True - break - fh.close() + if line == 'service integrated-vtysh-config': + service_integrated_vtysh_config = True + break if not service_integrated_vtysh_config: print "'service integrated-vtysh-config' is not configured, this is required for 'service quagga reload'" |
