Commit 97ac9598 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: protection in isSoftwareReleaseReady from malformed project names

parent 2032e7a5
...@@ -287,8 +287,9 @@ def config_SR_folder(config): ...@@ -287,8 +287,9 @@ def config_SR_folder(config):
if not folder_list: if not folder_list:
return return
current_project = open(os.path.join(config['etc_dir'], ".project")).read() current_project = open(os.path.join(config['etc_dir'], ".project")).read()
projects = current_project.split('/') if current_project[-1] == '/':
name = projects[-2] current_project = current_project[:-1]
name = current_project.split('/')[-1]
for folder in folder_list: for folder in folder_list:
if folder in list: if folder in list:
continue # this folder is already registered continue # this folder is already registered
......
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