X-Git-Url: https://git.ralfj.de/git-mirror.git/blobdiff_plain/9e8ef5ff99e70c7cc97445acbd91abaf539fd536..64ee17d3794aeb781203968d805ef8ab1963d871:/githook.py diff --git a/githook.py b/githook.py index 47a87e9..a503a47 100755 --- a/githook.py +++ b/githook.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # Copyright (c) 2015, Ralf Jung # All rights reserved. # @@ -41,7 +41,10 @@ if __name__ == "__main__": repo = repos[reponame] # parse the information we get from stdin. we trust this information. for line in sys.stdin: - (oldsha, newsha, ref) = line.split() + line = line.split() + if len(line) == 0: continue + assert len(line) == 3 + (oldsha, newsha, ref) = line repo.update_mirrors(ref, oldsha, newsha) except Exception as e: if repo is not None: