From 85710c7ca5a9da0c2d0dc699913e2ff91c083886 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 26 May 2016 19:53:49 +0200 Subject: [PATCH] Fix a rare error --- git-sound.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-sound.py b/git-sound.py index e1d1b19..314dab0 100644 --- a/git-sound.py +++ b/git-sound.py @@ -71,7 +71,7 @@ def get_file_sha(commit, file_name): while True: try: t = t[elements.pop(0)] - except KeyError: + except (KeyError, IndexError): # The file has been deleted, return the hash of an empty file return 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391'