Commit 72d42c9a authored by Devaev Maxim's avatar Devaev Maxim

Correct processing of missing files

parent d725f1c2
......@@ -235,7 +235,11 @@ class Service(service.Service, pyinotify.ThreadedNotifier) :
def localGroups(self) :
group_name_regexp = re.compile(r"(^[a-z_][a-z0-9_-]*):")
group_config_file = open(config.value(SERVICE_NAME, "group_conf"))
try :
group_config_file = open(config.value(SERVICE_NAME, "group_conf"))
except :
logger.attachException()
return []
group_names_list = []
for group_record in group_config_file.read().split("\n") :
......
......@@ -296,7 +296,11 @@ class Service(service.Service, pyinotify.ThreadedNotifier) :
def localUsers(self) :
user_name_regexp = re.compile(r"(^[a-z_][a-z0-9_-]*):")
passwd_config_file = open(config.value(SERVICE_NAME, "passwd_conf"))
try :
passwd_config_file = open(config.value(SERVICE_NAME, "passwd_conf"))
except :
logger.attachException()
return []
user_names_list = []
for passwd_record in passwd_config_file.read().split("\n") :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment