test: notmuch_drop_mail_headers() style update
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 3 Sep 2017 20:24:55 +0000 (23:24 +0300)
committerDavid Bremner <david@tethera.net>
Mon, 4 Sep 2017 11:03:52 +0000 (08:03 -0300)
Changed "" quotes to '' as we're not supposed to dynamically
alter python program (via shell $variable expansion).

Added space to python program to match general python style.

Replaced $* with 'idiomatic' "$@" to serve as better example.

test/test-lib.sh

index 09ee815d80605c31de722976a3236835638553ef..350246492d8c2dbd0e6faf16c9dc26d19a77223c 100644 (file)
@@ -509,12 +509,12 @@ NOTMUCH_DUMP_TAGS ()
 
 notmuch_drop_mail_headers ()
 {
-    $NOTMUCH_PYTHON -c "
-import email,sys
-msg=email.message_from_file(sys.stdin)
+    $NOTMUCH_PYTHON -c '
+import email, sys
+msg = email.message_from_file(sys.stdin)
 for hdr in sys.argv[1:]: del msg[hdr]
 print(msg.as_string(False))
-" $*
+' "$@"
 }
 
 notmuch_search_sanitize ()