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

George Joseph asteriskteam at digium.com
Wed Aug 2 07:02:20 CDT 2017


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/6123


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

digium_commits.py:  Handle inproperly 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(-)



  git pull ssh://gerrit.asterisk.org:29418/repotools refs/changes/23/6123/1

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: newchange
Gerrit-Change-Id: If740bf2f3e7b27cbd044ae853fb9aa5552953a93
Gerrit-Change-Number: 6123
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170802/12e39f38/attachment-0001.html>


More information about the asterisk-code-review mailing list