diff options
author | Louis Bouchard <louis.bouchard@canonical.com> | 2013-04-15 14:31:20 +0200 |
---|---|---|
committer | Louis Bouchard <louis.bouchard@canonical.com> | 2013-04-15 14:31:20 +0200 |
commit | 9160ec527bb361945fa747c3071d18066491366b (patch) | |
tree | 161681eaaf72a86f89d965a00990e0c27abbaa25 | |
parent | c7625fa0cd36b9df85e9ac6c6af8f5f51cfb6e6b (diff) | |
download | sos-9160ec527bb361945fa747c3071d18066491366b.tar.gz |
fix get_dns_dir which backtraces if regex is not found
-rw-r--r-- | sos/plugins/named.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/plugins/named.py b/sos/plugins/named.py index 812e20da..83dc6b22 100644 --- a/sos/plugins/named.py +++ b/sos/plugins/named.py @@ -27,7 +27,10 @@ class named(Plugin, RedHatPlugin): """ grab directory path from named{conf,boot} """ directory_list = self.do_regex_find_all("directory\s+\"(.*)\"", config_file) - return normpath(directory_list[0]) + if directory_list: + return normpath(directory_list[0]) + else: + return "" def setup(self): config_files = ("/etc/named.conf", |