From 77229cf438cc6e34c6bedb97776776796bbe9835 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Wed, 11 Feb 2009 21:48:12 +0100 Subject: [PATCH] patch: guard against unexpected patch-id output --- patch.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/patch.py b/patch.py index 7baa217..5e09aa8 100644 --- a/patch.py +++ b/patch.py @@ -78,5 +78,8 @@ class Patch(object): output = git('patch-id', input=data)[0] if not output: return - patch_id, commit_id = output.split() - return patch_id + try: + patch_id, commit_id = output.split() + return patch_id + except ValueError: + return -- 2.11.4.GIT