Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python module len() implementations #269

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

tobbez
Copy link
Contributor

@tobbez tobbez commented Jul 22, 2020

They were all missing the self. prefix when accessing the obj
instance variable, causing the following exception when attempting to
call len() on (for example) a ReplyInfo_RRSet:

  File "/usr/lib/python3.7/site-packages/unboundmodule.py", line 377, in __len__
    def __len__(self): return obj.rrset_count
NameError: name 'obj' is not defined

They were all missing the 'self.' prefix when accessing the 'obj'
instance variable, causing the following exception when attempting to
call len() on (for example) a ReplyInfo_RRSet:

  File "/usr/lib/python3.7/site-packages/unboundmodule.py", line 377, in __len__
    def __len__(self): return obj.rrset_count
NameError: name 'obj' is not defined
@ralphdolmans ralphdolmans self-assigned this Jul 22, 2020
@ralphdolmans
Copy link
Contributor

Thanks! I'll merge this after the 1.11 release.

@ralphdolmans ralphdolmans merged commit 5184c91 into NLnetLabs:master Jul 27, 2020
ralphdolmans added a commit that referenced this pull request Jul 27, 2020
jedisct1 added a commit to jedisct1/unbound that referenced this pull request Jul 27, 2020
* nlnet/master: (30 commits)
  Changelog note for PR NLnetLabs#270 - Merge PR NLnetLabs#270 from cgzones: munin plugin: always exit 0 in autoconf
  - Merge PR NLnetLabs#269, Fix python module len() implementations, by Torbjörn Lönnemark
  - branch now named 1.11.1.  1.11.0rc1 became the 1.11.0 release.
  munin plugin: always exit 0 in autoconf
  Fix python module len() implementations
  draft-ietf-dnsop-serve-stale-10 has become RFC 8767 on March 2020
  - branch now named 1.11.0 and 1.11.0rc1 tag.
  - Fix contrib/fastrpz.patch to apply cleanly.  It fixes for changes   due to added libdynmod, but it does not compile, it conflicts with   new rpz code.
  - Fix contrib/fastrpz.patch to apply cleanly.
  - Fix contrib/fastrpz.patch to apply cleanly.
  - Fix streamtcp to print packet data to stdout.  This makes the   stdout and stderr not mix together lines, when parsing its output.
  - Fix lock dependency cycle in rpz zone config setup.
  - Fix libnettle compile for session ticket key callback function   changes.
  - Merge PR NLnetLabs#234 - Ensure proper alignment of cmsg buffers by Jérémie   Courrèges-Anglas. - Fix PR NLnetLabs#234 log_assert sizeof to use union buffer.
  - Fix unused variable warning for clang analyzer.
  - Fix check conf test for referencing installation paths.
  - Changelog entry for PR NLnetLabs#265; include-toplevel.
  Change unbound-dnstap-socket void cast for unused parameter
  - Add changelog entry for bidirectional frame streams support.
  correct byte count in comment
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants