Convert some 'str' arguments to 'dns.name.Name' #1

Open
jeltz wants to merge 1 commit from str_to_dns_name into master
First-time contributor

It seems to be required by dnspython.

Otherwise I get the following error message:

Traceback (most recent call last):
  File "/aurore/dns-ansible/main.py", line 201, in <module>
    exit(main())
  File "/aurore/dns-ansible/main.py", line 193, in main
    dataset.add(record.dns_rdata)
  File "/usr/lib/python3/dist-packages/dns/rdataset.py", line 126, in add
    super().add(rd)
  File "/usr/lib/python3/dist-packages/dns/set.py", line 56, in add
    if item not in self.items:
  File "/usr/lib/python3/dist-packages/dns/rdata.py", line 293, in __hash__
    return hash(self.to_digestable(dns.name.root))
  File "/usr/lib/python3/dist-packages/dns/rdata.py", line 221, in to_digestable
    return self.to_wire(origin=origin, canonicalize=True)
  File "/usr/lib/python3/dist-packages/dns/rdata.py", line 203, in to_wire
    self._to_wire(f, compress, origin, canonicalize)
  File "/usr/lib/python3/dist-packages/dns/rdtypes/nsbase.py", line 47, in _to_wire
    self.target.to_wire(file, compress, origin, canonicalize)
AttributeError: 'str' object has no attribute 'to_wire'
It seems to be required by dnspython. Otherwise I get the following error message: ``` Traceback (most recent call last): File "/aurore/dns-ansible/main.py", line 201, in <module> exit(main()) File "/aurore/dns-ansible/main.py", line 193, in main dataset.add(record.dns_rdata) File "/usr/lib/python3/dist-packages/dns/rdataset.py", line 126, in add super().add(rd) File "/usr/lib/python3/dist-packages/dns/set.py", line 56, in add if item not in self.items: File "/usr/lib/python3/dist-packages/dns/rdata.py", line 293, in __hash__ return hash(self.to_digestable(dns.name.root)) File "/usr/lib/python3/dist-packages/dns/rdata.py", line 221, in to_digestable return self.to_wire(origin=origin, canonicalize=True) File "/usr/lib/python3/dist-packages/dns/rdata.py", line 203, in to_wire self._to_wire(f, compress, origin, canonicalize) File "/usr/lib/python3/dist-packages/dns/rdtypes/nsbase.py", line 47, in _to_wire self.target.to_wire(file, compress, origin, canonicalize) AttributeError: 'str' object has no attribute 'to_wire'
jeltz added 1 commit 2021-12-22 09:43:40 +01:00
It seems to be required by dnspython.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin str_to_dns_name:str_to_dns_name
git checkout str_to_dns_name

Merge

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff str_to_dns_name
git checkout master
git merge --ff-only str_to_dns_name
git checkout str_to_dns_name
git rebase master
git checkout master
git merge --no-ff str_to_dns_name
git checkout master
git merge --squash str_to_dns_name
git checkout master
git merge --ff-only str_to_dns_name
git checkout master
git merge str_to_dns_name
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: v-lafeychine/dns-ansible#1
No description provided.