diff options
author | Devaev Maxim <[email protected]> | 2019-06-28 18:59:36 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-06-28 18:59:36 +0300 |
commit | ef3c62a7af520673154233e2d3c89492ffec3195 (patch) | |
tree | 2b78c5918143eff8ef2c89484ac99fc6b7588438 /kvmd/apps/ipmi/auth.py | |
parent | ff270591b032cc1f8e342f20a04b84e5dbb31191 (diff) |
f-strings
Diffstat (limited to 'kvmd/apps/ipmi/auth.py')
-rw-r--r-- | kvmd/apps/ipmi/auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/apps/ipmi/auth.py b/kvmd/apps/ipmi/auth.py index d4c922d7..6b33216a 100644 --- a/kvmd/apps/ipmi/auth.py +++ b/kvmd/apps/ipmi/auth.py @@ -61,12 +61,12 @@ class IpmiAuthManager: continue if " -> " not in line: - raise IpmiPasswdError("Missing ' -> ' operator at line #%d" % (number)) + raise IpmiPasswdError(f"Missing ' -> ' operator at line #{number}") (left, right) = map(str.lstrip, line.split(" -> ", 1)) for (name, pair) in [("left", left), ("right", right)]: if ":" not in pair: - raise IpmiPasswdError("Missing ':' operator in %s credentials at line #%d" % (name, number)) + raise IpmiPasswdError(f"Missing ':' operator in {name} credentials at line #{number}") (ipmi_user, ipmi_passwd) = left.split(":") ipmi_user = ipmi_user.strip() @@ -75,7 +75,7 @@ class IpmiAuthManager: kvmd_user = kvmd_user.strip() if ipmi_user in credentials: - raise IpmiPasswdError("Found duplicating user %r (left) at line #%d" % (ipmi_user, number)) + raise IpmiPasswdError(f"Found duplicating user {ipmi_user!r} (left) at line #{number}") credentials[ipmi_user] = IpmiUserCredentials( ipmi_user=ipmi_user, |