You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sos.archive submodule contains a wrapper for the tarfile.TarFile class:
# Compatibility version of the tarfile.TarFile class. This exists to allow# compatibility with PY2 runtimes that lack the 'filter' parameter to the# TarFile.add() method. The wrapper class is used on python2.6 and earlier# only; all later versions include 'filter' and the native TarFile class is# used directly.class_TarFile(tarfile.TarFile):
# Taken from the python 2.7.5 tarfile.pydefadd(self, name, arcname=None, recursive=True,
exclude=None, filter=None):
"""Add the file `name' to the archive. `name' may be any type of file (directory, fifo, symbolic link, etc.). If given, `arcname' specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by setting `recursive' to False. `exclude' is a function that should return True for each filename to be excluded. `filter' is a function that expects a TarInfo object argument and returns the changed TarInfo object, if it returns None the TarInfo object will be excluded from the archive. """
Since the earliest 2.x release we test with now is Python-2.7 this can now be removed and the module simplified to just rely on the regular TarFile implementation.
The text was updated successfully, but these errors were encountered:
The _TarFile wrapper in sos.archive is only needed for python 2.6
and earlier: remove it since we no longer support this version.
Closes: #1834Resolves: #1838
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
The _TarFile wrapper in sos.archive is only needed for python 2.6
and earlier: remove it since we no longer support this version.
Closes: #1834Resolves: #1838
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
The
sos.archive
submodule contains a wrapper for thetarfile.TarFile
class:Since the earliest 2.x release we test with now is Python-2.7 this can now be removed and the module simplified to just rely on the regular
TarFile
implementation.The text was updated successfully, but these errors were encountered: