Repository: storm
Updated Branches:
  refs/heads/master 1a94d9e28 -> 795edec74


STORM-1161: Adding ratprint.py


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/8805443c
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/8805443c
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/8805443c

Branch: refs/heads/master
Commit: 8805443c6ff81eb6718e3cb9a844187b19e66ffe
Parents: 0892f09
Author: Aaron Dossett <[email protected]>
Authored: Fri Nov 6 10:55:42 2015 -0600
Committer: Aaron Dossett <[email protected]>
Committed: Fri Nov 6 10:55:42 2015 -0600

----------------------------------------------------------------------
 dev-tools/travis/ratprint.py | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/8805443c/dev-tools/travis/ratprint.py
----------------------------------------------------------------------
diff --git a/dev-tools/travis/ratprint.py b/dev-tools/travis/ratprint.py
new file mode 100755
index 0000000..5031045
--- /dev/null
+++ b/dev-tools/travis/ratprint.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+import sys
+import re
+
+p = re.compile('Unapproved licenses:\s*([^\s\*]*).*\*\*\*')
+
+with open (sys.argv[1]) as ratfile:
+  rat = ratfile.read().replace('\n','')
+
+matches = p.search(rat)
+failed =  matches.group(1)
+
+if re.search('\S', failed):
+  print failed

Reply via email to