[CalendarServer-changes] [6457] CalendarServer/trunk/pyflakes

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 22 15:19:17 PDT 2010


Revision: 6457
          http://trac.macosforge.org/projects/calendarserver/changeset/6457
Author:   wsanchez at apple.com
Date:     2010-10-22 15:19:15 -0700 (Fri, 22 Oct 2010)
Log Message:
-----------
Exit non-zero if we get any output from pyflakes.

Modified Paths:
--------------
    CalendarServer/trunk/pyflakes

Modified: CalendarServer/trunk/pyflakes
===================================================================
--- CalendarServer/trunk/pyflakes	2010-10-22 22:12:40 UTC (rev 6456)
+++ CalendarServer/trunk/pyflakes	2010-10-22 22:19:15 UTC (rev 6457)
@@ -12,6 +12,8 @@
   set - calendarserver twext twisted twistedcaldav txdav;
 fi;
 
+tmp="$(mktemp -t pyflakes)";
+
 cd "${wd}" && "${flakes}/bin/pyflakes" "$@" | sed                     \
   -e "/undefined name '_'/d"                                          \
   -e "/undefined name 'CalDAVFile'/d"                                 \
@@ -20,4 +22,10 @@
   -e "/redefinition of function/d"                                    \
   -e "/i[a-z]*store.py:[0-9][0-9]*: '.*' imported but unused/d"       \
   -e "/xmlext.py:[0-9][0-9]*: /d"                                     \
-  ;
+  | tee "${tmp}";
+
+if [ -s "${tmp}" ]; then error="true"; else error="false"; fi;
+
+rm -f "${tmp}";
+
+if "${error}"; then exit 1; fi;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101022/b9205d5c/attachment.html>


More information about the calendarserver-changes mailing list