diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-04-08 15:09:41 +0000 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-04-08 15:09:41 +0000 |
| commit | 19fb3bc6a6fc6328dfa90dac3e4066d931eaf129 (patch) | |
| tree | b8b7c147b37055a2319e6f7b71e7cb96aa9286a9 /python/depcache.cc | |
| parent | 08ea34d6a28b4b17d0146535e85d61ab7bda341d (diff) | |
| download | python-apt-19fb3bc6a6fc6328dfa90dac3e4066d931eaf129.tar.gz | |
* InstallProgress has overridable fork interface now, added example for the use of a vte terminal
Diffstat (limited to 'python/depcache.cc')
| -rw-r--r-- | python/depcache.cc | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/python/depcache.cc b/python/depcache.cc index 89974358..8a8cb22d 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -72,6 +72,8 @@ static PyObject *PkgDepCacheInit(PyObject *Self,PyObject *Args) static PyObject *PkgDepCacheCommit(PyObject *Self,PyObject *Args) { + PyObject *result; + PkgDepCacheStruct &Struct = GetCpp<PkgDepCacheStruct>(Self); PyObject *pyInstallProgressInst = 0; @@ -158,16 +160,21 @@ static PyObject *PkgDepCacheCommit(PyObject *Self,PyObject *Args) pkgPackageManager::OrderResult Res = iprogress.Run(PM); //FIXME: return usefull values here - if (Res == pkgPackageManager::Failed || _error->PendingError() == true) - return Py_None/*false;*/; - if (Res == pkgPackageManager::Completed) - return Py_None /*true;*/; - + if (Res == pkgPackageManager::Failed || _error->PendingError() == true) { + result = Py_BuildValue("b", false); + return result; + } + if (Res == pkgPackageManager::Completed) { + result = Py_BuildValue("b", true); + return result; + } + // Reload the fetcher object and loop again for media swapping Fetcher.Shutdown(); - if (PM->GetArchives(&Fetcher,&List,&Recs) == false) - return Py_None /*false;*/; - + if (PM->GetArchives(&Fetcher,&List,&Recs) == false) { + result = Py_BuildValue("b", false); + return result; + } _system->Lock(); } |
