Commit 476245d6 authored by Marco Mariani's avatar Marco Mariani

SlapObject: removed redundant os.path.exists()

parent f03386a3
......@@ -518,12 +518,10 @@ class Partition(object):
"""
runner_list = []
service_list = []
if os.path.exists(self.run_path):
if os.path.isdir(self.run_path):
runner_list = os.listdir(self.run_path)
if os.path.exists(self.service_path):
if os.path.isdir(self.service_path):
service_list = os.listdir(self.service_path)
if os.path.isdir(self.run_path):
runner_list = os.listdir(self.run_path)
if os.path.isdir(self.service_path):
service_list = os.listdir(self.service_path)
if len(runner_list) == 0 and len(service_list) == 0:
self.logger.warning('No runners nor services found for partition %r',
self.partition_id)
......
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