]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
fix python 3.5 format string 395/head
authorkimballo <kimballleavitt@gmail.com>
Thu, 3 Oct 2019 23:01:46 +0000 (17:01 -0600)
committerkimballo <kimballleavitt@gmail.com>
Thu, 3 Oct 2019 23:02:44 +0000 (17:02 -0600)
dns/edns.py

index 8fe3c6168491c06330ccfe08f6ecd6f0430090e3..5e843a3f7342429764c0ac21ec8fa212fdee86e9 100644 (file)
@@ -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):