[Asterisk-code-review] digium commits.py: Handle improperly formatted patch info (repotools[master])

Joshua Colp asteriskteam at digium.com
Fri Aug 4 08:24:18 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6123 )

Change subject: digium_commits.py:  Handle improperly formatted patch info
......................................................................

digium_commits.py:  Handle improperly formatted patch info

If the patches "submitted by" line was improperly formatted,
digium_commits would throw an exception and cause mkrelease.py
to crash.  It now handles the bad formatting by simply printing
the offending commit message and continuing.  The commit itself
is still processed, just without the solution attribution.

Change-Id: If740bf2f3e7b27cbd044ae853fb9aa5552953a93
---
M digium_commits.py
1 file changed, 8 insertions(+), 1 deletion(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/digium_commits.py b/digium_commits.py
index 5727c20..448e119 100644
--- a/digium_commits.py
+++ b/digium_commits.py
@@ -165,7 +165,14 @@
             if 'submitted by' in token.lower():
                 name = token[token.lower().index('submitted by') + 12:]
             if name:
-                user = self.extract_user(name)
+                user = None
+                try:
+                    user = self.extract_user(name)
+                    break
+                except:
+                    print("INFO: Unable to parse message for users: ")
+                    print(self.message)
+
                 if user and user not in coders:
                     coders.append(user)
         if len(coders) == 0:

-- 
To view, visit https://gerrit.asterisk.org/6123
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If740bf2f3e7b27cbd044ae853fb9aa5552953a93
Gerrit-Change-Number: 6123
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170804/2cb51a1c/attachment.html>


More information about the asterisk-code-review mailing list