Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion omd/packages/omd/omdlib/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

"""Cares about backing up the files of a site"""

# mypy: disable-error-code="comparison-overlap"
# mypy: disable-error-code="redundant-expr"

import contextlib
import errno
import fnmatch
Expand Down Expand Up @@ -384,7 +387,7 @@ def _tar_add(
# Create a TarInfo object from the file.
tarinfo = _get_tar_info_or_raise(tar, name, arcname)
# Exclude files.
if not predicate(tarinfo):
if tarinfo is None or not predicate(tarinfo):
return

# Create a backup of history file and add it to the archive as history.sqlite.
Expand Down
Loading