~ubuntu-branches/ubuntu/karmic/calibre/karmic

« back to all changes in this revision

Viewing changes to src/calibre/devices/libusb.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-30 12:49:41 UTC
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20090730124941-kviipg9ypwgppulc
Tags: upstream-0.6.3+dfsg
ImportĀ upstreamĀ versionĀ 0.6.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
            raise Error("Cannot open device")
117
117
        return handle.contents    
118
118
    
119
 
    @apply
120
 
    def configurations():
 
119
    @dynamic_property
 
120
    def configurations(self):
121
121
        doc = """ List of device configurations. See L{ConfigDescriptor} """
122
122
        def fget(self):
123
123
            ans = []
127
127
        return property(doc=doc, fget=fget)
128
128
 
129
129
class Bus(Structure):
130
 
    @apply
131
 
    def device_list():
 
130
    @dynamic_property
 
131
    def device_list(self):
132
132
        doc = \
133
133
        """ 
134
134
        Flat list of devices on this bus. 
360
360
        for dev in devices:
361
361
            device = (dev.device_descriptor.idVendor, dev.device_descriptor.idProduct, dev.device_descriptor.bcdDevice)
362
362
            ans.append(device)
363
 
    return ans
 
363
    return ans
 
 
b'\\ No newline at end of file'