Public bug reported:

Binary package hint: python-apt

In one of the example programs (/usr/share/doc/python-apt/examples/config.py) 
an api 'apt_pkg.Architecture' is used to retrive the apt architecture.
But trying to use this fails with following error

Traceback (most recent call last):
  File "arch.py", line 5, in <module>
    print apt_pkg.Architecture
AttributeError: 'module' object has no attribute 'Architecture'

The api 'apt_pkg.Config.Find("APT::Architecture")' works properly.


Example program:

#!/usr/bin/python
import apt_pkg

apt_pkg.init()
print "Find api: " + apt_pkg.Config.Find("APT::Architecture")
print "Direct arch value: " + apt_pkg.Architecture

** Affects: python-apt (Ubuntu)
     Importance: Undecided
         Status: New

-- 
[hardy] API 'apt_pkg.Architecture' not present
https://bugs.launchpad.net/bugs/194374
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to