# HG changeset patch # User Martin Bornhold # Date 2016-09-19 13:31:57 # Node ID ed7b68ec2896e114c7f29e69a1e3144ed4dfcb41 # Parent 4fa21815f4e50368a6063bfba92f5fce90bde48f vcs: Use key lookup to explode if key is not available. The key has to be in the dictionary, otherwise something changed in the code and expoding here is better than hiding the error. diff --git a/rhodecode/lib/middleware/simplevcs.py b/rhodecode/lib/middleware/simplevcs.py --- a/rhodecode/lib/middleware/simplevcs.py +++ b/rhodecode/lib/middleware/simplevcs.py @@ -124,7 +124,7 @@ class SimpleVCS(object): self.acl_repo_name = '{base_name}/{repo_name}'.format(**match_dict) self.vcs_repo_name = '{base_name}/.__shadow_{repo_name}_pr-{pr_id}'.format( **match_dict) - self.pr_id = match_dict.get('pr_id') + self.pr_id = match_dict['pr_id'] else: self.acl_repo_name = self.url_repo_name self.vcs_repo_name = self.url_repo_name