mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Bump dnspython from 2.6.1 to 2.7.0 (#2440)
* Bump dnspython from 2.6.1 to 2.7.0 Bumps [dnspython](https://github.com/rthalley/dnspython) from 2.6.1 to 2.7.0. - [Release notes](https://github.com/rthalley/dnspython/releases) - [Changelog](https://github.com/rthalley/dnspython/blob/main/doc/whatsnew.rst) - [Commits](https://github.com/rthalley/dnspython/compare/v2.6.1...v2.7.0) --- 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.7.0 --------- 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
0836fb902c
commit
feca713b76
56 changed files with 1382 additions and 665 deletions
|
@ -230,7 +230,7 @@ class Reader:
|
|||
try:
|
||||
rdtype = dns.rdatatype.from_text(token.value)
|
||||
except Exception:
|
||||
raise dns.exception.SyntaxError("unknown rdatatype '%s'" % token.value)
|
||||
raise dns.exception.SyntaxError(f"unknown rdatatype '{token.value}'")
|
||||
|
||||
try:
|
||||
rd = dns.rdata.from_text(
|
||||
|
@ -251,9 +251,7 @@ class Reader:
|
|||
# We convert them to syntax errors so that we can emit
|
||||
# helpful filename:line info.
|
||||
(ty, va) = sys.exc_info()[:2]
|
||||
raise dns.exception.SyntaxError(
|
||||
"caught exception {}: {}".format(str(ty), str(va))
|
||||
)
|
||||
raise dns.exception.SyntaxError(f"caught exception {str(ty)}: {str(va)}")
|
||||
|
||||
if not self.default_ttl_known and rdtype == dns.rdatatype.SOA:
|
||||
# The pre-RFC2308 and pre-BIND9 behavior inherits the zone default
|
||||
|
@ -281,41 +279,41 @@ class Reader:
|
|||
# Sometimes there are modifiers in the hostname. These come after
|
||||
# the dollar sign. They are in the form: ${offset[,width[,base]]}.
|
||||
# Make names
|
||||
mod = ""
|
||||
sign = "+"
|
||||
offset = "0"
|
||||
width = "0"
|
||||
base = "d"
|
||||
g1 = is_generate1.match(side)
|
||||
if g1:
|
||||
mod, sign, offset, width, base = g1.groups()
|
||||
if sign == "":
|
||||
sign = "+"
|
||||
g2 = is_generate2.match(side)
|
||||
if g2:
|
||||
mod, sign, offset = g2.groups()
|
||||
if sign == "":
|
||||
sign = "+"
|
||||
width = 0
|
||||
base = "d"
|
||||
g3 = is_generate3.match(side)
|
||||
if g3:
|
||||
mod, sign, offset, width = g3.groups()
|
||||
if sign == "":
|
||||
sign = "+"
|
||||
base = "d"
|
||||
else:
|
||||
g2 = is_generate2.match(side)
|
||||
if g2:
|
||||
mod, sign, offset = g2.groups()
|
||||
if sign == "":
|
||||
sign = "+"
|
||||
width = "0"
|
||||
base = "d"
|
||||
else:
|
||||
g3 = is_generate3.match(side)
|
||||
if g3:
|
||||
mod, sign, offset, width = g3.groups()
|
||||
if sign == "":
|
||||
sign = "+"
|
||||
base = "d"
|
||||
|
||||
if not (g1 or g2 or g3):
|
||||
mod = ""
|
||||
sign = "+"
|
||||
offset = 0
|
||||
width = 0
|
||||
base = "d"
|
||||
|
||||
offset = int(offset)
|
||||
width = int(width)
|
||||
ioffset = int(offset)
|
||||
iwidth = int(width)
|
||||
|
||||
if sign not in ["+", "-"]:
|
||||
raise dns.exception.SyntaxError("invalid offset sign %s" % sign)
|
||||
raise dns.exception.SyntaxError(f"invalid offset sign {sign}")
|
||||
if base not in ["d", "o", "x", "X", "n", "N"]:
|
||||
raise dns.exception.SyntaxError("invalid type %s" % base)
|
||||
raise dns.exception.SyntaxError(f"invalid type {base}")
|
||||
|
||||
return mod, sign, offset, width, base
|
||||
return mod, sign, ioffset, iwidth, base
|
||||
|
||||
def _generate_line(self):
|
||||
# range lhs [ttl] [class] type rhs [ comment ]
|
||||
|
@ -377,7 +375,7 @@ class Reader:
|
|||
if not token.is_identifier():
|
||||
raise dns.exception.SyntaxError
|
||||
except Exception:
|
||||
raise dns.exception.SyntaxError("unknown rdatatype '%s'" % token.value)
|
||||
raise dns.exception.SyntaxError(f"unknown rdatatype '{token.value}'")
|
||||
|
||||
# rhs (required)
|
||||
rhs = token.value
|
||||
|
@ -412,8 +410,8 @@ class Reader:
|
|||
lzfindex = _format_index(lindex, lbase, lwidth)
|
||||
rzfindex = _format_index(rindex, rbase, rwidth)
|
||||
|
||||
name = lhs.replace("$%s" % (lmod), lzfindex)
|
||||
rdata = rhs.replace("$%s" % (rmod), rzfindex)
|
||||
name = lhs.replace(f"${lmod}", lzfindex)
|
||||
rdata = rhs.replace(f"${rmod}", rzfindex)
|
||||
|
||||
self.last_name = dns.name.from_text(
|
||||
name, self.current_origin, self.tok.idna_codec
|
||||
|
@ -445,7 +443,7 @@ class Reader:
|
|||
# helpful filename:line info.
|
||||
(ty, va) = sys.exc_info()[:2]
|
||||
raise dns.exception.SyntaxError(
|
||||
"caught exception %s: %s" % (str(ty), str(va))
|
||||
f"caught exception {str(ty)}: {str(va)}"
|
||||
)
|
||||
|
||||
self.txn.add(name, ttl, rd)
|
||||
|
@ -528,7 +526,7 @@ class Reader:
|
|||
self.default_ttl_known,
|
||||
)
|
||||
)
|
||||
self.current_file = open(filename, "r")
|
||||
self.current_file = open(filename)
|
||||
self.tok = dns.tokenizer.Tokenizer(self.current_file, filename)
|
||||
self.current_origin = new_origin
|
||||
elif c == "$GENERATE":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue