From 7051066cf258caa2a3fd45271faa3d46b8a6d98a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 3 Jun 2009 17:27:33 +0200 Subject: python/: Convert most names to PEP8 naming conventions (except Version,PackageFile,MetaIndex). On our way to close Bug#481061, this converts almost all names to PEP 8 naming conventions. Missing are now apt_pkg.Version, apt_pkg.PackageFile, apt_pkg.MetaIndex and apt.progress.*. In case of the missing apt_pkg classes, they are not converted yet because they do not use getset descriptors yet. apt.progress.* has not been converted yet because the extension interacts with it, and we first need to modify the extension to recognize the new names, as well as the old names (old applications shouldn't break). --- python/pkgmanager.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'python/pkgmanager.cc') diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc index 781acc8b..cae2b580 100644 --- a/python/pkgmanager.cc +++ b/python/pkgmanager.cc @@ -92,9 +92,14 @@ static PyObject *PkgManagerFixMissing(PyObject *Self,PyObject *Args) static PyMethodDef PkgManagerMethods[] = { + {"get_archives",PkgManagerGetArchives,METH_VARARGS,"Load the selected archives into the fetcher"}, + {"do_install",PkgManagerDoInstall,METH_VARARGS,"Do the actual install"}, + {"fix_missing",PkgManagerFixMissing,METH_VARARGS,"Fix the install if a pkg couldn't be downloaded"}, +#ifdef COMPAT_0_7 {"GetArchives",PkgManagerGetArchives,METH_VARARGS,"Load the selected archives into the fetcher"}, {"DoInstall",PkgManagerDoInstall,METH_VARARGS,"Do the actual install"}, {"FixMissing",PkgManagerFixMissing,METH_VARARGS,"Fix the install if a pkg couldn't be downloaded"}, +#endif {} }; @@ -110,9 +115,14 @@ static PyObject *PkgManagerGetResultIncomplete(PyObject *Self,void*) { } static PyGetSetDef PkgManagerGetSet[] = { + {"result_completed",PkgManagerGetResultCompleted}, + {"result_failed",PkgManagerGetResultFailed}, + {"result_incomplete",PkgManagerGetResultIncomplete}, +#ifdef COMPAT_0_7 {"ResultCompleted",PkgManagerGetResultCompleted}, {"ResultFailed",PkgManagerGetResultFailed}, {"ResultIncomplete",PkgManagerGetResultIncomplete}, +#endif {} }; -- cgit v1.2.3