Merge lp:~mterry/duplicity/guard-tarinfo into lp:duplicity/0.6

Proposed by Michael Terry
Status: Merged
Merged at revision: 758
Proposed branch: lp:~mterry/duplicity/guard-tarinfo
Merge into: lp:duplicity/0.6
Diff against target: 20 lines (+3/-0)
1 file modified
duplicity/tarfile.py (+3/-0)
To merge this branch: bzr merge lp:~mterry/duplicity/guard-tarinfo
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+65688@code.launchpad.net

Description of the change

A deja-dup user described a duplicity traceback that seemed preventable:

https://bugs.launchpad.net/ubuntu/+source/deja-dup/+bug/616482/comments/3

Here's a fix. It's not clear that this will help the user (something else is likely wrong for us to get to this point), but it will presumably allow them to get further.

Since _proc_gnulong() can return None, it's output needs to be checked before being used.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'duplicity/tarfile.py'
2--- duplicity/tarfile.py 2010-07-22 19:15:11 +0000
3+++ duplicity/tarfile.py 2011-06-23 15:50:58 +0000
4@@ -562,6 +562,8 @@
5 # statement, we must process this first.
6 if tarinfo.type in (GNUTYPE_LONGLINK, GNUTYPE_LONGNAME):
7 tarinfo = self._proc_gnulong(tarinfo, tarinfo.type)
8+ if not tarinfo:
9+ return None
10
11 if tarinfo.issparse():
12 assert 0, "Sparse file support turned off"
13@@ -1111,6 +1113,7 @@
14 tarinfo = self._buftoinfo(buf)
15 if tarinfo.type in (GNUTYPE_LONGLINK, GNUTYPE_LONGNAME):
16 tarinfo = self._proc_gnulong(tarinfo, tarinfo.type)
17+ if not tarinfo: return None
18 if name is not None:
19 tarinfo.name = name
20 if linkname is not None:

Subscribers

People subscribed via source and target branches

to all changes: