diff options
| author | Julian Andres Klode <jak@debian.org> | 2013-10-08 21:09:08 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2013-10-08 21:09:08 +0200 |
| commit | d0739a17f824a7bf3cfa217223b88979c571e7dd (patch) | |
| tree | b24e85001c811ac265621c87d9c814d8a655217b /apt | |
| parent | 29415534292efd2b0c4d2306857ad5c7db5369c5 (diff) | |
| download | python-apt-d0739a17f824a7bf3cfa217223b88979c571e7dd.tar.gz | |
apt/package.py: Add a Package.has_config_files property (Closes: #712749)
The name might be a bit misleading, but I cannot find a short name that
completely describes this check.
Diffstat (limited to 'apt')
| -rw-r--r-- | apt/package.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt/package.py b/apt/package.py index f311eaff..f5aa5237 100644 --- a/apt/package.py +++ b/apt/package.py @@ -1051,6 +1051,11 @@ class Package(object): """Return True if the installed package is broken.""" return self._pcache._depcache.is_now_broken(self._pkg) + @property + def has_config_files(self): + """Checks whether the package is is the config-files state.""" + return self. _pkg.current_state == apt_pkg.CURSTATE_CONFIG_FILES + # depcache actions def mark_keep(self): |
