Skip to content

Commit

Permalink
don't rename import as link2xt prefers
Browse files Browse the repository at this point in the history
  • Loading branch information
hpk42 committed Sep 2, 2024
1 parent e32d815 commit 8d72d77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmdeploy/src/cmdeploy/remote/rdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import re

from .rshell import ShellError, shell
from .rshell import CalledProcessError, shell


def perform_initial_checks(mail_domain):
Expand Down Expand Up @@ -44,7 +44,7 @@ def get_dkim_entry(mail_domain, dkim_selector):
f"openssl rsa -in /etc/dkimkeys/{dkim_selector}.private "
"-pubout 2>/dev/null | awk '/-/{next}{printf(\"%s\",$0)}'"
)
except ShellError:
except CalledProcessError:
return
dkim_value_raw = f"v=DKIM1;k=rsa;p={dkim_pubkey};s=email;t=s"
dkim_value = '" "'.join(re.findall(".{1,255}", dkim_value_raw))
Expand Down
5 changes: 2 additions & 3 deletions cmdeploy/src/cmdeploy/remote/rshell.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from subprocess import CalledProcessError as ShellError
from subprocess import check_output
from subprocess import CalledProcessError, check_output


def shell(command, fail_ok=False):
print(f"$ {command}")
try:
return check_output(command, shell=True).decode().rstrip()
except ShellError:
except CalledProcessError:
if not fail_ok:
raise
return ""
Expand Down

0 comments on commit 8d72d77

Please sign in to comment.