You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.7 KiB
79 lines
2.7 KiB
4 years ago
|
From 19b61c3b0dc31ee60341b3ca708f8e459e44ce3f Mon Sep 17 00:00:00 2001
|
||
|
From: Phil Dibowitz <phil@ipom.com>
|
||
|
Date: Mon, 23 Mar 2020 08:57:09 -0700
|
||
|
Subject: [PATCH] Minor fixes for pius-report (#137)
|
||
|
|
||
|
Signed-off-by: Phil Dibowitz <phil@ipom.com>
|
||
|
---
|
||
|
libpius/mailer.py | 2 +-
|
||
|
pius-keyring-mgr | 4 +++-
|
||
|
pius-report | 5 +++--
|
||
|
3 files changed, 7 insertions(+), 4 deletions(-)
|
||
|
|
||
4 years ago
|
diff --git a/libpius/mailer.py b/libpius/mailer.py
|
||
|
index ba6b50a..f5b097f 100644
|
||
|
--- a/libpius/mailer.py
|
||
|
+++ b/libpius/mailer.py
|
||
|
@@ -403,7 +403,7 @@ class PiusMailer:
|
||
|
# BCC the user...
|
||
|
env_to = [msg["To"], self.mail]
|
||
|
|
||
|
- smtp.sendmail(self.mail, env_to, msg.as_string())
|
||
|
+ smtp.sendmail(self.mail, env_to, msg.as_string().encode('utf-8'))
|
||
|
smtp.quit()
|
||
|
except smtplib.SMTPException as emsg:
|
||
|
raise MailSendError(emsg)
|
||
|
diff --git a/pius-keyring-mgr b/pius-keyring-mgr
|
||
|
index fb0b46a..ec3528a 100755
|
||
|
--- a/pius-keyring-mgr
|
||
|
+++ b/pius-keyring-mgr
|
||
|
@@ -1,4 +1,5 @@
|
||
|
#!/usr/bin/env python3
|
||
|
+
|
||
|
"""A utility to create and manage party keyrings."""
|
||
|
|
||
|
# vim:tw=80:ai:tabstop=4:expandtab:shiftwidth=4
|
||
|
@@ -446,7 +447,7 @@ class KeyringBuilder:
|
||
|
# stolen from pius
|
||
|
def get_all_keyids(self, sort_keyring):
|
||
|
"""Given a keyring, get all the KeyIDs from it."""
|
||
|
- util.debug("extracting all keyids from keyring")
|
||
|
+ util.debug("extracting all keyids from keyring, sort: %s" % sort_keyring)
|
||
|
extra_opts = GPG_QUIET_OPTS + self.AUTO_OPTS + ["--fixed-list-mode"]
|
||
|
cmd = self.basecmd + extra_opts + ["--fingerprint"]
|
||
|
util.logcmd(cmd)
|
||
|
@@ -776,6 +777,7 @@ before distributing they keyring.
|
||
|
prune.add_option(
|
||
|
"--no-sort-keyring",
|
||
|
dest="sort_keyring",
|
||
|
+ default=True,
|
||
|
action="store_false",
|
||
|
help="Do not sort the keyring by name.",
|
||
|
)
|
||
|
diff --git a/pius-report b/pius-report
|
||
|
index 47f57b5..744da35 100755
|
||
|
--- a/pius-report
|
||
|
+++ b/pius-report
|
||
|
@@ -15,7 +15,8 @@ from optparse import OptionParser
|
||
|
from libpius import mailer as pmailer
|
||
|
from libpius import signer as psigner
|
||
|
from libpius.util import PiusUtil, MyOption
|
||
|
-from libpius.constants import DEFAULT_GPG_PATH, UID_RE, GPG_MIN_OPTS
|
||
|
+from libpius.constants import DEFAULT_GPG_PATH, UID_RE, GPG_MIN_OPTS, \
|
||
|
+ GPG_BASE_OPTS
|
||
|
from libpius.exceptions import MailSendError
|
||
|
from libpius.state import SignState
|
||
|
|
||
|
@@ -401,7 +402,7 @@ Generated by PIUS Report BETA (http://www.phildev.net/pius/).
|
||
|
|
||
|
def refresh_keys(gpg, keys):
|
||
|
cmd = [gpg] + GPG_MIN_OPTS + ["--refresh-keys"] + keys
|
||
|
- PiusPiusUtil.logcmd(cmd)
|
||
|
+ PiusUtil.logcmd(cmd)
|
||
|
gpg = subprocess.Popen(cmd, stdout=subprocess.PIPE, close_fds=True)
|
||
|
gpg.wait()
|
||
|
|
||
4 years ago
|
--
|
||
|
2.29.2
|
||
|
|