diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-29 11:02:42 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-29 11:02:42 +0200 |
| commit | cdaebccd5f7a5a0e23a9be7989b64850fabafed1 (patch) | |
| tree | 52d3bd94c02ae9be75fb11bfd423043ef10838cc /python/cdrom.cc | |
| parent | 57624b5df523c0b3a3ebc1741680f283ee1fbbcd (diff) | |
| parent | 340f6a3d54f5705801267f365fb08b5d20228fe6 (diff) | |
| download | python-apt-cdaebccd5f7a5a0e23a9be7989b64850fabafed1.tar.gz | |
merged from debian-sid
Diffstat (limited to 'python/cdrom.cc')
| -rw-r--r-- | python/cdrom.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/python/cdrom.cc b/python/cdrom.cc index 9eae49dc..7f89e9d3 100644 --- a/python/cdrom.cc +++ b/python/cdrom.cc @@ -30,7 +30,7 @@ static char *cdrom_add_doc = "add(progress: apt_pkg.CdromProgress) -> bool\n\n" - "Add the given CD-ROM to the sources.list. Returns True on success, may\n" + "Add the given CD-ROM to the sources.list. Return True on success;\n" "raise an error on failure or return False."; static PyObject *cdrom_add(PyObject *Self,PyObject *Args) { @@ -51,8 +51,11 @@ static PyObject *cdrom_add(PyObject *Self,PyObject *Args) static char *cdrom_ident_doc = "ident(progress: apt_pkg.CdromProgress) -> str\n\n" - "Try to identify the CD-ROM and if successful return the identity as a\n" - "string. Otherwise, return None or raise an error."; + "Try to identify the CD-ROM and if successful return the hexadecimal\n" + "CDROM-ID (and a integer version suffix seperated by -) as a\n" + "string. Otherwise, return None or raise an error.\n\n" + "The ID is created by hashing all file and directory names on the\n" + "CD-ROM and appending the version."; static PyObject *cdrom_ident(PyObject *Self,PyObject *Args) { pkgCdrom &Cdrom = GetCpp<pkgCdrom>(Self); @@ -94,7 +97,8 @@ static PyObject *cdrom_ident_old(PyObject *Self,PyObject *Args) string ident; bool res = Cdrom.Ident(ident, &progress); - PyObject *result = Py_BuildValue("(bs)", res, ident.c_str()); + PyObject *boolres = PyBool_FromLong(res); + PyObject *result = Py_BuildValue("(Os)", boolres, ident.c_str()); return HandleErrors(result); } |
