Commit 9af4f13a authored by Antoine Catton's avatar Antoine Catton

Minor: check if promise dir exists before list it

This solve the problem of software release which doesn't provide
any promise
parent 671d052c
......@@ -475,7 +475,8 @@ class Slapgrid(object):
gid = stat_info.st_gid
# Get the list of promises
promise_dir = os.join(instance_path, 'etc', 'promise')
promise_dir = os.path.join(instance_path, 'etc', 'promise')
if os.path.exists(promise_dir) and os.path.isdir(promise_dir):
commands_to_run = os.listdir(promise_dir)
cwd = instance_path
......
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