mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
create .lock file without needing the proj dir to exist
* We create <project_name>.lock file in the tower project root directory. This should not require that the project directory exists, only that the project directory name is generatable.
This commit is contained in:
parent
3c0d4bf134
commit
633da940a8
@ -209,7 +209,11 @@ class ProjectOptions(models.Model):
|
||||
return sorted(results, key=lambda x: smart_str(x).lower())
|
||||
|
||||
def get_lock_file(self):
|
||||
proj_path = self.get_project_path()
|
||||
'''
|
||||
We want the project path in name only, we don't care if it exists or
|
||||
not. This method will just append .lock onto the full directory path.
|
||||
'''
|
||||
proj_path = self.get_project_path(check_if_exists=False)
|
||||
if not proj_path:
|
||||
return None
|
||||
return proj_path + '.lock'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user