fix PEP8 & docstrings

This commit is contained in:
Roman Zeyde 2016-02-19 20:51:19 +02:00
parent 41b30b42b5
commit d6532311b9

View File

@ -64,6 +64,7 @@ def setup_logging(verbosity):
def git_host(remote_name):
"""Extract git SSH host for specified remote name."""
output = subprocess.check_output('git config --local --list'.split())
pattern = r'remote\.{}\.url=(.*)'.format(remote_name)
matches = re.findall(pattern, output)
@ -75,6 +76,7 @@ def git_host(remote_name):
host, path = url.split(':', 1)
return 'ssh://{}@{}/{}'.format(user, host, path)
def ssh_sign(conn, label, blob):
"""Perform SSH signature using given hardware device connection."""
now = time.strftime('%Y-%m-%d %H:%M:%S')