mirror of
https://github.com/romanz/amodem.git
synced 2026-03-24 19:31:02 +08:00
Multiple style fixes
This commit is contained in:
@@ -18,6 +18,7 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
import daemon
|
||||
import pkg_resources
|
||||
import semver
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ def gpg_version(sp=subprocess):
|
||||
"""Get a keygrip of the primary GPG key of the specified user."""
|
||||
args = gpg_command(['--version'])
|
||||
output = check_output(args=args, sp=sp)
|
||||
line = output.split(b'\n')[0] # b'gpg (GnuPG) 2.1.11'
|
||||
line = output.split(b'\n', maxsplit=1)[0] # b'gpg (GnuPG) 2.1.11'
|
||||
line = line.split(b' ')[-1] # b'2.1.11'
|
||||
line = line.split(b'-')[0] # remove trailing version parts
|
||||
return line.split(b'v')[-1] # remove 'v' prefix
|
||||
|
||||
Reference in New Issue
Block a user