gauteh / lieer

Fast email-fetching and sending and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
494 stars 60 forks source link

Fix gmi send -d (dry-run) #260

Closed mechanicalamit closed 6 months ago

mechanicalamit commented 6 months ago

msg within send function is used to read in stdin first. Later on in the function msg is used to get back data from the message send, however this occurs inside a not dry-run condition.

When a dry-run is made, msg is not updated and holds stale data from stdin.read. The function then fails trying to print the stale msg data.

Fix by seperating into two print statements, one for the dry-run, and one without.

Closes #259 (hopefully)

mechanicalamit commented 6 months ago

Reformatted with black and force pushed update.

Not sure on the lint/ruff errors yet. Any guidance?

gauteh commented 6 months ago

Thanks, merged! The rest of the errors were unrelated to this change.