mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Bump dnspython from 2.3.0 to 2.4.2 (#2123)
* Bump dnspython from 2.3.0 to 2.4.2 Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.3.0 to 2.4.2. - [Release notes](https://github.com/rthalley/dnspython/releases) - [Changelog](https://github.com/rthalley/dnspython/blob/master/doc/whatsnew.rst) - [Commits](https://github.com/rthalley/dnspython/compare/v2.3.0...v2.4.2) --- updated-dependencies: - dependency-name: dnspython dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update dnspython==2.4.2 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
9f00f5dafa
commit
c0aa4e4996
108 changed files with 2985 additions and 1136 deletions
|
@ -17,9 +17,8 @@
|
|||
|
||||
"""A place to store TSIG keys."""
|
||||
|
||||
from typing import Any, Dict
|
||||
|
||||
import base64
|
||||
from typing import Any, Dict
|
||||
|
||||
import dns.name
|
||||
import dns.tsig
|
||||
|
@ -33,7 +32,7 @@ def from_text(textring: Dict[str, Any]) -> Dict[dns.name.Name, dns.tsig.Key]:
|
|||
@rtype: dict"""
|
||||
|
||||
keyring = {}
|
||||
for (name, value) in textring.items():
|
||||
for name, value in textring.items():
|
||||
kname = dns.name.from_text(name)
|
||||
if isinstance(value, str):
|
||||
keyring[kname] = dns.tsig.Key(kname, value).secret
|
||||
|
@ -55,7 +54,7 @@ def to_text(keyring: Dict[dns.name.Name, Any]) -> Dict[str, Any]:
|
|||
def b64encode(secret):
|
||||
return base64.encodebytes(secret).decode().rstrip()
|
||||
|
||||
for (name, key) in keyring.items():
|
||||
for name, key in keyring.items():
|
||||
tname = name.to_text()
|
||||
if isinstance(key, bytes):
|
||||
textring[tname] = b64encode(key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue