summaryrefslogtreecommitdiff
path: root/python/pkgmanager.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-01-13 17:22:27 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-01-13 17:22:27 +0100
commit38d602dc83006c51dfe4ed594d691ea9b0679498 (patch)
treeb7aedfba82c44cad6c3012f879b5d6d7e8ad1425 /python/pkgmanager.cc
parent12cf58d12b969010f3d98b2974d72bbb950b775f (diff)
parent614897f798d9f16591fbd29ebe2a6c5674102d2d (diff)
downloadpython-apt-38d602dc83006c51dfe4ed594d691ea9b0679498.tar.gz
* apt/*.py:
- Almost complete cleanup of the code - Remove inconsistent use of tabs and spaces (Closes: #505443) - Improved documentation * apt/debfile.py: - Drop get*() methods, as they are deprecated and were never in a stable release - Make DscSrcPackage working * apt/gtk/widgets.py: - Fix the code and document the signals * Introduce new documentation build with Sphinx - Contains style Guide (Closes: #481562) - debian/rules: Build the documentation here - setup.py: Remove pydoc building and add new docs. - debian/examples: Include examples from documentation - debian/python-apt.docs: + Change html/ to build/doc/html. + Add build/doc/text for the text-only documentation * setup.py: - Only create build/data when building, not all the time - Remove build/mo and build/data on clean -a * debian/control: - Remove the Conflicts on python2.3-apt, python2.4-apt, as they are only needed for oldstable (sarge) - Build-Depend on python-sphinx (>= 0.5) * aptsources/distinfo.py: - Allow @ in mirror urls (Closes: #478171) (LP: #223097) * Merge Ben Finney's whitespace changes (Closes: #481563) * Merge Ben Finney's do not use has_key() (Closes: #481878) * Do not use deprecated form of raise statement (Closes: #494259) * Add support for PkgRecords.SHA256Hash (Closes: #456113)
Diffstat (limited to 'python/pkgmanager.cc')
-rw-r--r--python/pkgmanager.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc
index 9670f238..0eaa28cd 100644
--- a/python/pkgmanager.cc
+++ b/python/pkgmanager.cc
@@ -19,14 +19,14 @@
static PyObject *PkgManagerGetArchives(PyObject *Self,PyObject *Args)
-{
+{
pkgPackageManager *pm = GetCpp<pkgPackageManager*>(Self);
PyObject *fetcher, *list, *recs;
-
+
if (PyArg_ParseTuple(Args, "O!O!O!",
&PkgAcquireType,&fetcher,
&PkgSourceListType, &list,
- &PkgRecordsType, &recs) == 0)
+ &PkgRecordsType, &recs) == 0)
return 0;
pkgAcquire *s_fetcher = GetCpp<pkgAcquire*>(fetcher);
@@ -44,12 +44,12 @@ static PyObject *PkgManagerDoInstall(PyObject *Self,PyObject *Args)
//PkgManagerStruct &Struct = GetCpp<PkgManagerStruct>(Self);
pkgPackageManager *pm = GetCpp<pkgPackageManager*>(Self);
int status_fd = -1;
-
+
if (PyArg_ParseTuple(Args, "|i", &status_fd) == 0)
return 0;
pkgPackageManager::OrderResult res = pm->DoInstall(status_fd);
-
+
return HandleErrors(Py_BuildValue("i",res));
}
@@ -62,11 +62,11 @@ static PyObject *PkgManagerFixMissing(PyObject *Self,PyObject *Args)
return 0;
bool res = pm->FixMissing();
-
+
return HandleErrors(Py_BuildValue("b",res));
}
-static PyMethodDef PkgManagerMethods[] =
+static PyMethodDef PkgManagerMethods[] =
{
{"GetArchives",PkgManagerGetArchives,METH_VARARGS,"Load the selected archives into the fetcher"},
{"DoInstall",PkgManagerDoInstall,METH_VARARGS,"Do the actual install"},
@@ -81,11 +81,11 @@ static PyObject *PkgManagerAttr(PyObject *Self,char *Name)
pkgPackageManager *pm = GetCpp<pkgPackageManager*>(Self);
// some constants
- if(strcmp("ResultCompleted",Name) == 0)
+ if(strcmp("ResultCompleted",Name) == 0)
return Py_BuildValue("i", pkgPackageManager::Completed);
- if(strcmp("ResultFailed",Name) == 0)
+ if(strcmp("ResultFailed",Name) == 0)
return Py_BuildValue("i", pkgPackageManager::Failed);
- if(strcmp("ResultIncomplete",Name) == 0)
+ if(strcmp("ResultIncomplete",Name) == 0)
return Py_BuildValue("i", pkgPackageManager::Incomplete);
return Py_FindMethod(PkgManagerMethods,Self,Name);
@@ -125,7 +125,7 @@ PyObject *GetPkgManager(PyObject *Self,PyObject *Args)
CppPyObject<pkgPackageManager*> *PkgManagerObj =
CppPyObject_NEW<pkgPackageManager*>(&PkgManagerType,pm);
-
+
return PkgManagerObj;
}