diff --git a/vcsserver/hooks.py b/vcsserver/hooks.py --- a/vcsserver/hooks.py +++ b/vcsserver/hooks.py @@ -633,7 +633,7 @@ def git_post_receive(unused_repo_path, r branches.append(push_ref['name']) cmd = [settings.GIT_EXECUTABLE, 'log', - '{old_rev}..{new_rev}'.format(**push_ref), + f'{push_ref["old_rev"]}..{push_ref["new_rev"]}', '--reverse', '--pretty=format:%H'] stdout, stderr = subprocessio.run_command( cmd, env=os.environ.copy()) diff --git a/vcsserver/utils.py b/vcsserver/utils.py --- a/vcsserver/utils.py +++ b/vcsserver/utils.py @@ -41,8 +41,7 @@ class StrictAttributeDict(AttributeDictB try: return self[attr] except KeyError: - raise AttributeError('{} object has no attribute {}'.format( - self.__class__, attr)) + raise AttributeError(f'{self.__class__} object has no attribute {attr}') class AttributeDict(AttributeDictBase):