diff options
author | John Helmert III <ajak@gentoo.org> | 2022-08-14 19:39:48 -0500 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-03 01:38:22 +0000 |
commit | 88ce0e6fc46ebd3bad583790ceb19f9be218d0ca (patch) | |
tree | 59b39ce1ffa6c577a4108dac779dea9f5e41905e /bin/glsa-check | |
parent | bintree: Fix breaking GPKG structure on updates (diff) | |
download | portage-88ce0e6fc46ebd3bad583790ceb19f9be218d0ca.tar.gz portage-88ce0e6fc46ebd3bad583790ceb19f9be218d0ca.tar.bz2 portage-88ce0e6fc46ebd3bad583790ceb19f9be218d0ca.zip |
pyupgrade everything
Signed-off-by: John Helmert III <ajak@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'bin/glsa-check')
-rwxr-xr-x | bin/glsa-check | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/bin/glsa-check b/bin/glsa-check index 431590cf8..753c13891 100755 --- a/bin/glsa-check +++ b/bin/glsa-check @@ -211,7 +211,7 @@ if "affected" in params: except (GlsaTypeException, GlsaFormatException) as e: if verbose: sys.stderr.write( - ("invalid GLSA: %s (error message was: %s)\n" % (x, e)) + "invalid GLSA: {} (error message was: {})\n".format(x, e) ) continue if myglsa.isVulnerable(): @@ -222,10 +222,8 @@ if "affected" in params: for p in params[:]: if not (p in completelist or os.path.exists(p)): sys.stderr.write( - ( - "(removing %s from parameter list as it isn't a valid GLSA specification)\n" - % p - ) + "(removing %s from parameter list as it isn't a valid GLSA specification)\n" + % p ) params.remove(p) @@ -252,7 +250,7 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr, encoding="utf-8"): myglsa = Glsa(myid, portage.settings, vardb, portdb) except (GlsaTypeException, GlsaFormatException) as e: if verbose: - fd2.write(("invalid GLSA: %s (error message was: %s)\n" % (myid, e))) + fd2.write("invalid GLSA: {} (error message was: {})\n".format(myid, e)) continue if myglsa.isInjected(): status = "[A]" @@ -322,7 +320,7 @@ if mode in ["dump", "fix", "inject", "pretend"]: except (GlsaTypeException, GlsaFormatException) as e: if verbose: sys.stderr.write( - ("invalid GLSA: %s (error message was: %s)\n" % (myid, e)) + "invalid GLSA: {} (error message was: {})\n".format(myid, e) ) continue if mode == "dump": @@ -416,7 +414,7 @@ if mode == "test": except (GlsaTypeException, GlsaFormatException) as e: if verbose: sys.stderr.write( - ("invalid GLSA: %s (error message was: %s)\n" % (myid, e)) + "invalid GLSA: {} (error message was: {})\n".format(myid, e) ) continue if myglsa.isVulnerable(): @@ -471,7 +469,7 @@ if mode == "mail": except (GlsaTypeException, GlsaFormatException) as e: if verbose: sys.stderr.write( - ("invalid GLSA: %s (error message was: %s)\n" % (myid, e)) + "invalid GLSA: {} (error message was: {})\n".format(myid, e) ) continue myfd = BytesIO() |