aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/named.py5
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",