diff options
| -rw-r--r-- | apt/progress.py | 1 | ||||
| -rw-r--r-- | python/depcache.cc | 2 | ||||
| -rw-r--r-- | python/progress.cc | 10 |
3 files changed, 8 insertions, 5 deletions
diff --git a/apt/progress.py b/apt/progress.py index 8c264140..86cd6594 100644 --- a/apt/progress.py +++ b/apt/progress.py @@ -128,7 +128,6 @@ class InstallProgress: def updateInterface(self): pass - class CdromProgress: """ Report the cdrom add progress Subclass this class to implement cdrom add progress reporting diff --git a/python/depcache.cc b/python/depcache.cc index fb506c96..c78d0077 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -99,7 +99,7 @@ static PyObject *PkgDepCacheCommit(PyObject *Self,PyObject *Args) return HandleErrors(); } - std::cout << "PM created" << std::endl; + //std::cout << "PM created" << std::endl; PyInstallProgress iprogress; iprogress.setCallbackInst(pyInstallProgressInst); diff --git a/python/progress.cc b/python/progress.cc index 5267134f..12f9c7a8 100644 --- a/python/progress.cc +++ b/python/progress.cc @@ -244,9 +244,13 @@ pkgPackageManager::OrderResult PyInstallProgress::Run(pkgPackageManager *pm) #endif if (child_id == 0) { PyObject *v = PyObject_GetAttrString(callbackInst, "writefd"); - int fd = PyObject_AsFileDescriptor(v); - cout << "got fd: " << fd << endl; - res = pm->DoInstall(fd); + if(v) { + int fd = PyObject_AsFileDescriptor(v); + cout << "got fd: " << fd << endl; + res = pm->DoInstall(fd); + } else { + res = pm->DoInstall(); + } _exit(res); } |
