duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #00622
[Merge] lp:~mterry/duplicity/guard-tarinfo into lp:duplicity
Michael Terry has proposed merging lp:~mterry/duplicity/guard-tarinfo into lp:duplicity.
Requested reviews:
duplicity-team (duplicity-team)
For more details, see:
https://code.launchpad.net/~mterry/duplicity/guard-tarinfo/+merge/65688
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.
--
https://code.launchpad.net/~mterry/duplicity/guard-tarinfo/+merge/65688
Your team duplicity-team is requested to review the proposed merge of lp:~mterry/duplicity/guard-tarinfo into lp:duplicity.
=== modified file 'duplicity/tarfile.py'
--- duplicity/tarfile.py 2010-07-22 19:15:11 +0000
+++ duplicity/tarfile.py 2011-06-23 15:48:43 +0000
@@ -562,6 +562,8 @@
# statement, we must process this first.
if tarinfo.type in (GNUTYPE_LONGLINK, GNUTYPE_LONGNAME):
tarinfo = self._proc_gnulong(tarinfo, tarinfo.type)
+ if not tarinfo:
+ return None
if tarinfo.issparse():
assert 0, "Sparse file support turned off"
@@ -1111,6 +1113,7 @@
tarinfo = self._buftoinfo(buf)
if tarinfo.type in (GNUTYPE_LONGLINK, GNUTYPE_LONGNAME):
tarinfo = self._proc_gnulong(tarinfo, tarinfo.type)
+ if not tarinfo: return None
if name is not None:
tarinfo.name = name
if linkname is not None:
Follow ups