Rush has submitted this change and it was merged.

Change subject: phab_epipe better debug options
......................................................................


phab_epipe better debug options

Change-Id: I4dab1a48d8c7cfd8b11e565ce4d787fddd3f915b
---
M modules/phabricator/files/phab_epipe.py
1 file changed, 10 insertions(+), 4 deletions(-)

Approvals:
  Rush: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/phabricator/files/phab_epipe.py 
b/modules/phabricator/files/phab_epipe.py
index 81c9ba5..6afcf07 100644
--- a/modules/phabricator/files/phab_epipe.py
+++ b/modules/phabricator/files/phab_epipe.py
@@ -298,7 +298,7 @@
         save = False
 
     if 'debug' in defaults:
-        defaults['debug'] = defaults['debug'].split(',')
+        defaults['debug'] = defaults['debug'].lower().split(',')
 
     # Reading in the message
     stdin = sys.stdin.read()
@@ -322,9 +322,14 @@
     else:
         cc_addresses = []
 
-    if 'debug' in defaults and src_address in defaults['debug']:
-        with open('/tmp/%s' % (src_address + '.txt'), 'w') as r:
-            r.write(stdin)
+    # Some email clients do crazy things and it is very
+    # difficult to debug without the raw message.  In these (rare)
+    # cases we can add the sender to debug to log
+    if 'debug' in defaults:
+        src = src_addy.lower().strip()
+        if src in defaults['debug']:
+            with open('/tmp/%s' % (src_addy + '.txt'), 'w') as r:
+                r.write(stdin)
 
     # does this email have a direct to task addresss
     dtask = extract_direct_task(dest_addresses + cc_addresses)
@@ -420,6 +425,7 @@
                       body,
                       project,
                       security))
+
     else:
         phab_handoff(stdin)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/256975
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dab1a48d8c7cfd8b11e565ce4d787fddd3f915b
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Rush <r...@wikimedia.org>
Gerrit-Reviewer: Rush <r...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to