From 9db0a69df3f0ca8d36e76afe1b47025e70572ebb Mon Sep 17 00:00:00 2001 From: Liyu Liu Date: Fri, 16 Jun 2017 23:43:28 -0500 Subject: [PATCH] hotfix for repo.py in guess_is_binary(newblob) where 'newblob' could be referenced before assignment --- klaus/repo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/klaus/repo.py b/klaus/repo.py index 548b8c04..bda9b7dd 100644 --- a/klaus/repo.py +++ b/klaus/repo.py @@ -194,6 +194,7 @@ def commit_diff(self, commit): dulwich_changes = self.object_store.tree_changes(parent_tree, commit.tree) for (oldpath, newpath), (oldmode, newmode), (oldsha, newsha) in dulwich_changes: summary['nfiles'] += 1 + newblob = oldblob = Blob.from_string(b'') try: oldblob = self.object_store[oldsha] if oldsha else Blob.from_string(b'') newblob = self.object_store[newsha] if newsha else Blob.from_string(b'')