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

« back to all changes in this revision

Viewing changes to src/calibre/ebooks/lrf/tags.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-30 12:49:41 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730124941-qjdsmri25zt8zocn
Tags: 0.6.3+dfsg-0ubuntu1
* New upstream release. Please see http://calibre.kovidgoyal.net/new_in_6/
  for the list of new features and changes.
* remove_postinstall.patch: Update for new version.
* build_debug.patch: Does not apply any more, disable for now. Might not be
  necessary any more.
* debian/copyright: Fix reference to versionless GPL.
* debian/rules: Drop obsolete dh_desktop call.
* debian/rules: Add workaround for weird Python 2.6 setuptools behaviour of
  putting compiled .so files into src/calibre/plugins/calibre/plugins
  instead of src/calibre/plugins.
* debian/rules: Drop hal fdi moving, new upstream version does not use hal
  any more. Drop hal dependency, too.
* debian/rules: Install udev rules into /lib/udev/rules.d.
* Add debian/calibre.preinst: Remove unmodified
  /etc/udev/rules.d/95-calibre.rules on upgrade.
* debian/control: Bump Python dependencies to 2.6, since upstream needs
  it now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
        s += " at %08X, contents: %s" % (self.offset, repr(self.contents))
208
208
        return s
209
209
    
210
 
    @apply
211
 
    def byte():
 
210
    @dynamic_property
 
211
    def byte(self):
212
212
        def fget(self):
213
213
            if len(self.contents) != 1:
214
214
                raise LRFParseError("Bad parameter for tag ID: %04X" % self.id)
215
215
            return struct.unpack("<B", self.contents)[0]
216
216
        return property(fget=fget)
217
217
    
218
 
    @apply
219
 
    def word():
 
218
    @dynamic_property
 
219
    def word(self):
220
220
        def fget(self):
221
221
            if len(self.contents) != 2:
222
222
                raise LRFParseError("Bad parameter for tag ID: %04X" % self.id)
223
223
            return struct.unpack("<H", self.contents)[0]
224
224
        return property(fget=fget)
225
225
    
226
 
    @apply
227
 
    def sword():
 
226
    @dynamic_property
 
227
    def sword(self):
228
228
        def fget(self):
229
229
            if len(self.contents) != 2:
230
230
                raise LRFParseError("Bad parameter for tag ID: %04X" % self.id)
231
231
            return struct.unpack("<h", self.contents)[0]
232
232
        return property(fget=fget)
233
233
    
234
 
    @apply
235
 
    def dword():
 
234
    @dynamic_property
 
235
    def dword(self):
236
236
        def fget(self):
237
237
            if len(self.contents) != 4:
238
238
                raise LRFParseError("Bad parameter for tag ID: %04X" % self.id)