Skip to content

Fix "scap lock" for mediawiki

main.py, LockManager:

Handle the case where git_repo is not defined in configuration, as
is the case when locking /srv/mediawiki-staging.
Application.get_lock_file() already handling for this but
LockManager.main() did not. This is now fixed.

Before:

debian@deploy:~$ scap lock testing  
23:12:47 Unhandled error:  
Traceback (most recent call last):  
  File "/workspace/scap/scap/cli.py", line 542, in run  
    exit_status = app.main(app.extra_arguments)  
  File "/workspace/scap/scap/main.py", line 1254, in main  
    repo = self.config["git_repo"]  
KeyError: 'git_repo'  
23:12:47 lock failed: <KeyError> 'git_repo'  

After:

debian@deploy:~$ scap lock testing  
23:15:30 Locking from deployment [mediawiki]: testing  
23:15:30 Press enter to unlock...  
  

Merge request reports