[gnome-keysign: 6/9] util: email: Log an empty to address



commit 46fbc0d2da00e8e4a28f2b20d595a0ed4282c036
Author: Tobias Mueller <muelli cryptobitch de>
Date:   Mon Feb 12 21:35:51 2018 +0100

    util: email: Log an empty to address
    
    When the signed key does not have a proper email address, like foo@bar,
    an empty recipient is passed down.  We might investigate the source of
    this bug rather than papering over it here.

 keysign/util.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/keysign/util.py b/keysign/util.py
index 7a42441..eaeaf02 100644
--- a/keysign/util.py
+++ b/keysign/util.py
@@ -75,6 +75,9 @@ def email_file(to, from_=None, subject=None,
     for file_ in files or []:
         cmd += ['--attach', file_]
 
+    if not to:
+        log.error("email_file: We are seeing an empty 'to': %r", to)
+
     cmd += [to]
 
     log.info("Running %s", cmd)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]