mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
15 lines
355 B
Python
15 lines
355 B
Python
from typing import Optional
|
|
|
|
from bauh.commons.system import SystemProcess, new_subprocess
|
|
|
|
|
|
def receive_key(key: str, server: Optional[str] = None) -> SystemProcess:
|
|
cmd = ['gpg']
|
|
|
|
if server:
|
|
cmd.extend(['--keyserver', server])
|
|
|
|
cmd.extend(['--recv-key', key])
|
|
|
|
return SystemProcess(new_subprocess(cmd), check_error_output=False)
|