]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not use f-strings in Python system tests
authorMichał Kępień <michal@isc.org>
Thu, 21 May 2020 09:33:11 +0000 (11:33 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 21 May 2020 09:38:26 +0000 (11:38 +0200)
Use str.format() instead of f-strings in Python system tests to enable
them to work on Python 3 versions older than 3.6 as the latter is not
available on some operating systems used in GitLab CI that are still
actively supported (CentOS 6, Debian 9, Ubuntu 16.04).

(cherry picked from commit 5562c38ffb33da7f074dbe796a21124fe1ecf9dd)

bin/tests/system/statschannel/helper.py

index 7b53e9e9fecb7c21347569794b44cbfd52a17a6e..ba6cf701341e8f8d2212170eea69e99e81c11f30 100644 (file)
@@ -79,9 +79,9 @@ def zone_mtime(zonedir, name):
 
 
 def zone_keyid(nameserver, zone, key):
-    with open(f'{nameserver}/{zone}.{key}.id') as f:
+    with open('{}/{}.{}.id'.format(nameserver, zone, key)) as f:
         keyid = f.read().strip()
-        print(f'{zone}-{key} ID: {keyid}')
+        print('{}-{} ID: {}'.format(zone, key, keyid))
     return keyid