~ubuntu-branches/ubuntu/saucy/dnspython/saucy-proposed

« back to all changes in this revision

Viewing changes to dns/rdtypes/ANY/NSEC3.py

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2013-07-17 02:49:46 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130717024946-g4j9400pq90uhgia
Tags: 1.11.0-1
* New upstream release
* Agreed maintainer switch to DPMT
  - Add Vcs-* fields to debian/control
* Bump minimum debhelper version to 8.1 and compat to 8 for build-arch/indep
  support
* Bump standards version to 3.9.4 without further change

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
            prior_rdtype = nrdtype
115
115
            new_window = nrdtype // 256
116
116
            if new_window != window:
117
 
                windows.append((window, ''.join(bitmap[0:octets])))
 
117
                if octets != 0:
 
118
                    windows.append((window, ''.join(bitmap[0:octets])))
118
119
                bitmap = ['\0'] * 32
119
120
                window = new_window
120
121
            offset = nrdtype % 256
122
123
            bit = offset % 8
123
124
            octets = byte + 1
124
125
            bitmap[byte] = chr(ord(bitmap[byte]) | (0x80 >> bit))
125
 
        windows.append((window, ''.join(bitmap[0:octets])))
 
126
        if octets != 0:
 
127
            windows.append((window, ''.join(bitmap[0:octets])))
126
128
        return cls(rdclass, rdtype, algorithm, flags, iterations, salt, next, windows)
127
129
 
128
130
    from_text = classmethod(from_text)