diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-10-12 11:02:57 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-10-12 11:02:57 +0200 |
| commit | 78e9e09c400d9ea185da11328a00ef9251c0b342 (patch) | |
| tree | adab3d6038502cdd97557805d22a54080143e070 /python/cache.cc | |
| parent | fbc1eb3e01df0dad1779ff723018936b4a0a5921 (diff) | |
| parent | 43d87e1b14719750585412ab1d15fc30e280b7d0 (diff) | |
| download | python-apt-78e9e09c400d9ea185da11328a00ef9251c0b342.tar.gz | |
* add dep8 style autopkgtest support
* add "codename" to the PackageFile object
* python/cache.cc:
- Use Popen.communicate() instead of stdin, stdout
Diffstat (limited to 'python/cache.cc')
| -rw-r--r-- | python/cache.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/cache.cc b/python/cache.cc index 10561ca0..e527faba 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -1247,6 +1247,12 @@ static PyObject *PackageFile_GetArchitecture(PyObject *Self,void*) return Safe_FromString(File.Architecture()); } +static PyObject *PackageFile_GetCodename(PyObject *Self,void*) +{ + pkgCache::PkgFileIterator &File = GetCpp<pkgCache::PkgFileIterator>(Self); + return Safe_FromString(File.Codename()); +} + static PyObject *PackageFile_GetSite(PyObject *Self,void*) { pkgCache::PkgFileIterator &File = GetCpp<pkgCache::PkgFileIterator>(Self); @@ -1305,6 +1311,8 @@ static PyGetSetDef PackageFileGetSet[] = { "The archive of the package file (i.e. 'Suite' in the Release file)."}, {"component",PackageFile_GetComponent,0, "The component of this package file (e.g. 'main')."}, + {"codename",PackageFile_GetCodename,0, + "The codename of this package file (e.g. squeeze-updates)."}, {"filename",PackageFile_GetFileName,0, "The path to the file."}, {"id",PackageFile_GetID,0, |
