From 4523d0c79d42de783b8a4e8ee3ccea617dfc0ccc Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Mon, 15 Apr 2019 23:50:41 -0700 Subject: [PATCH] Make attributes None if not provided --- rbackup/plugins/packagemanager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rbackup/plugins/packagemanager.py b/rbackup/plugins/packagemanager.py index f78d47c..6213888 100644 --- a/rbackup/plugins/packagemanager.py +++ b/rbackup/plugins/packagemanager.py @@ -50,10 +50,10 @@ class PackageManager: :param pkglist_cmd: command to list installed packages to stdout :type pkglist_cmd: str or iterable of str """ - self._cachedir = Path(cachedir) - self._db_path = Path(db_path) - self._lockfile = Path(lockfile) - self._pkglist_cmd = pkglist_cmd + self._cachedir = Path(cachedir) if cachedir else None + self._db_path = Path(db_path) if db_path else None + self._lockfile = Path(lockfile) if lockfile else None + self._pkglist_cmd = pkglist_cmd if pkglist_cmd else None def __enter__(self): """Create the package manager's lockfile. This prevents transactions