diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-08-28 11:37:07 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-08-28 11:37:07 +0200 |
commit | 0f84a0d082d9924691316029f63ed0ee66bcb75e (patch) | |
tree | bf68d41dd107f6b4bbafdab3a468c613b70b33e8 /gbp/patch_series.py | |
parent | 04ae7d5654684d8077a4125c90e36f4195057fa9 (diff) |
patch_series: Make sure we close the temp file
Diffstat (limited to 'gbp/patch_series.py')
-rw-r--r-- | gbp/patch_series.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/patch_series.py b/gbp/patch_series.py index 2cffe099..5e2559e5 100644 --- a/gbp/patch_series.py +++ b/gbp/patch_series.py @@ -75,11 +75,11 @@ class Patch(object): self.info[header] = value.strip() try: self.long_desc = "".join([l.decode() for l in body]) - body.close() except (IOError, UnicodeDecodeError) as msg: raise GbpError("Failed to read patch header of '%s': %s" % (self.path, msg)) finally: + body.close() if os.path.exists(body.name): os.unlink(body.name) |