diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-09-08 12:12:13 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-09-08 12:12:13 +0200 |
| commit | 90fa0ecbc1459e60a9fe78458d9ab7043a156f94 (patch) | |
| tree | 63b254b2e9f5dda2a16c640b9c19967a3335b0c1 | |
| parent | 57c801f9472ac8572110f8958be1089fca6937f1 (diff) | |
| download | python-apt-90fa0ecbc1459e60a9fe78458d9ab7043a156f94.tar.gz | |
* apt/debfile.py:
- remove bogus comment
* python/tag.cc:
- allow "bytes" type in TagSecNew (for python3)
| -rw-r--r-- | apt/debfile.py | 1 | ||||
| -rw-r--r-- | python/tag.cc | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/apt/debfile.py b/apt/debfile.py index 7728ed21..25a45e98 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -65,7 +65,6 @@ class DebPackage(object): self.filename = filename self._debfile = apt_inst.DebFile(open(self.filename)) control = self._debfile.control.extractdata("control") - # hm, 'replace' is probably better but python2.6 test fail with that self._sections = apt_pkg.TagSection(control) self.pkgname = self._sections["Package"] diff --git a/python/tag.cc b/python/tag.cc index 97039bc4..44cd06af 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -344,8 +344,12 @@ static PyObject *TagFileJump(PyObject *Self,PyObject *Args) // --------------------------------------------------------------------- static PyObject *TagSecNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) { char *Data; + int Len; char *kwlist[] = {"text", 0}; - if (PyArg_ParseTupleAndKeywords(Args,kwds,"s",kwlist,&Data) == 0) + + // this allows reading "byte" types from python3 - but we don't + // make (much) use of it yet + if (PyArg_ParseTupleAndKeywords(Args,kwds,"s#",kwlist,&Data,&Len) == 0) return 0; // Create the object.. |
