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

Does this work on Python 3? #1

Open
Flimm opened this issue Aug 11, 2017 · 5 comments · May be fixed by #5
Open

Does this work on Python 3? #1

Flimm opened this issue Aug 11, 2017 · 5 comments · May be fixed by #5

Comments

@Flimm
Copy link

Flimm commented Aug 11, 2017

It's not clear from the README which Python versions this supports.

@pabs3
Copy link
Contributor

pabs3 commented Aug 7, 2021

@Flimm currently dnsgraph only works with Python 2, but I've just ported the command-line portions of it to work with Python 3 (see PR #4).

@LatinSuD
Copy link

LatinSuD commented Mar 7, 2022

It still failed some times.

Traceback (most recent call last):
...
   return zone.resolve(name, rdtype)
  File "./tracegraph.py", line 105, in resolve
    return self.resolvers.values()[0].resolve(name, rdtype=rdtype, register=False)
TypeError: 'dict_values' object does not support indexing

I had to change this on line 105:
return self.resolvers.values()[0].resolve(name, rdtype=rdtype, register=False)
for:
return list(self.resolvers.values())[0].resolve(name, rdtype=rdtype, register=False)

@pabs3 pabs3 linked a pull request Mar 7, 2022 that will close this issue
@pabs3
Copy link
Contributor

pabs3 commented Mar 7, 2022 via email

@LatinSuD
Copy link

LatinSuD commented Oct 18, 2022

There is still one catch that just happened to me.

...
  File "tracegraph.py", line 283, in resolve
    self.ip = list(self.root.resolve(self.name, dns.rdatatype.A))
TypeError: 'NoneType' object is not iterable

What happened is that "resolve()" returned None.

A fix could be adding an IF like this:

                resolvelist = self.root.resolve(self.name, dns.rdatatype.A)
                if resolvelist:
                    self.ip = list(resolvelist)

@pabs3
Copy link
Contributor

pabs3 commented Oct 19, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants