Issue #6856: Add a filter keyword argument to TarFile.add().
commitf6fdd8e0197d9a4820346535364314d0c46fd0c8
authorlars.gustaebel <lars.gustaebel@6015fed2-1504-0410-9fe1-9d1591cc4771>
Sat, 12 Sep 2009 10:28:15 +0000 (12 10:28 +0000)
committerlars.gustaebel <lars.gustaebel@6015fed2-1504-0410-9fe1-9d1591cc4771>
Sat, 12 Sep 2009 10:28:15 +0000 (12 10:28 +0000)
treef870896a5eace1473d20b62477992ae1424bdd89
parent3f8498fd61103859ec1d8255cbd6bc6e9c6c3374
Issue #6856: Add a filter keyword argument to TarFile.add().

The filter argument must be a function that takes a TarInfo
object argument, changes it and returns it again. If the
function returns None the TarInfo object will be excluded
from the archive.
The exclude argument is deprecated from now on, because it
does something similar but is not as flexible.

git-svn-id: http://svn.python.org/projects/python/trunk@74750 6015fed2-1504-0410-9fe1-9d1591cc4771
Doc/library/tarfile.rst
Lib/tarfile.py
Lib/test/test_tarfile.py
Misc/NEWS