Browse Source

fix: Add or remove logs

gns
juga 1 year ago
parent
commit
9a3dea8bb7
4 changed files with 8 additions and 2 deletions
  1. +1
    -1
      mixnet/client/cli.py
  2. +1
    -1
      mixnet/client/client.py
  3. +3
    -0
      mixnet/common.py
  4. +3
    -0
      mixnet/remailer/remailer.py

+ 1
- 1
mixnet/client/cli.py View File

@ -146,7 +146,7 @@ def main():
if args.test_net:
settings.TEST_NET = True
logger.info("Parsed arguments.")
client.process(sender, recipient, args.myfpr, subject, body, host, port)


+ 1
- 1
mixnet/client/client.py View File

@ -39,7 +39,7 @@ def onionize(me, msg, route):
logger.info(
"Message from %s encrypted to %s.", str(msg.from_), str(msg.to[0])
)
logger.debug("Onionized msg: %s", msg)
# logger.debug("Onionized msg: %s", msg)
return msg


+ 3
- 0
mixnet/common.py View File

@ -98,6 +98,7 @@ def set_identity(name_addr, fpr=""):
# with `ValueError: username needed )`, add one by default
name = name or "root"
ident = pEp.Identity(address, name, name_addr, fpr, 0, "")
logger.info("Created identity %s", name_addr)
# XXX: RuntimeError: username must be at least 5 characters
# ident.username = name
ident.user_id = name_addr
@ -109,6 +110,7 @@ def set_my_identity(name_addr, fpr=""):
me = set_identity(name_addr, fpr)
if fpr:
logger.info("Setting my own identity to: %s, %s.", me, fpr)
try:
pEp.set_own_key(me, fpr)
except RuntimeError as e:
@ -120,6 +122,7 @@ def set_my_identity(name_addr, fpr=""):
# XXX: why is changing user_id?
logger.info("Set my own identity to: %s, %s", me, fpr)
else:
logger.info("Setting my own identity to: %s.", me)
pEp.myself(me)
logger.info("Set my own identity to: %s", me)
return me


+ 3
- 0
mixnet/remailer/remailer.py View File

@ -24,6 +24,9 @@ def decrypt_email(email_str):
msg = common.create_incoming_msg(email_str)
dec_msg, key_list, rating, _r = msg.decrypt()
logger.debug(
"decrypt_email: key_list %s, rating %s, _r %s", key_list, rating, _r
)
# XXX: r is always 0?
if not key_list:
raise exceptions.EmailNotDecrypted


Loading…
Cancel
Save