From: kimballo Date: Thu, 3 Oct 2019 23:01:46 +0000 (-0600) Subject: fix python 3.5 format string X-Git-Tag: v2.0.0rc1~349^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F395%2Fhead;p=thirdparty%2Fdnspython.git fix python 3.5 format string --- diff --git a/dns/edns.py b/dns/edns.py index 8fe3c616..5e843a3f 100644 --- a/dns/edns.py +++ b/dns/edns.py @@ -232,10 +232,10 @@ class ECSOption(Option): ecs_text = tokens[0] elif len(tokens) == 2: if tokens[0] != optional_prefix: - raise ValueError(f'could not parse ECS from "{text}"') + raise ValueError('could not parse ECS from "{}"'.format(text)) ecs_text = tokens[1] else: - raise ValueError(f'could not parse ECS from "{text}"') + raise ValueError('could not parse ECS from "{}"'.format(text)) n_slashes = ecs_text.count('/') if n_slashes == 1: address, srclen = ecs_text.split('/') @@ -243,15 +243,15 @@ class ECSOption(Option): elif n_slashes == 2: address, srclen, scope = ecs_text.split('/') else: - raise ValueError(f'could not parse ECS from "{text}"') + raise ValueError('could not parse ECS from "{}"'.format(text)) try: scope = int(scope) except ValueError: - raise ValueError(f'invalid scope "{scope}": scope must be an integer') + raise ValueError('invalid scope "{}": scope must be an integer'.format(scope)) try: srclen = int(srclen) except ValueError: - raise ValueError(f'invalid srclen "{srclen}": srclen must be an integer') + raise ValueError('invalid srclen "{}": srclen must be an integer'.format(srclen)) return ECSOption(address, srclen, scope) def to_wire(self, file):