Return-Path: Delivered-To: apmail-incubator-rat-commits-archive@locus.apache.org Received: (qmail 14949 invoked from network); 28 Jun 2008 11:53:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jun 2008 11:53:50 -0000 Received: (qmail 73787 invoked by uid 500); 28 Jun 2008 11:53:52 -0000 Delivered-To: apmail-incubator-rat-commits-archive@incubator.apache.org Received: (qmail 73767 invoked by uid 500); 28 Jun 2008 11:53:52 -0000 Mailing-List: contact rat-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: rat-dev@incubator.apache.org Delivered-To: mailing list rat-commits@incubator.apache.org Received: (qmail 73758 invoked by uid 99); 28 Jun 2008 11:53:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jun 2008 04:53:51 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jun 2008 11:53:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B989823889F3; Sat, 28 Jun 2008 04:53:29 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r672498 - in /incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan: scanner.py tests.py Date: Sat, 28 Jun 2008 11:53:29 -0000 To: rat-commits@incubator.apache.org From: rdonkin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080628115329.B989823889F3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rdonkin Date: Sat Jun 28 04:53:29 2008 New Revision: 672498 URL: http://svn.apache.org/viewvc?rev=672498&view=rev Log: Avoid concatination Modified: incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/scanner.py incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/tests.py Modified: incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/scanner.py URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/scanner.py?rev=672498&r1=672497&r2=672498&view=diff ============================================================================== --- incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/scanner.py (original) +++ incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/scanner.py Sat Jun 28 04:53:29 2008 @@ -65,8 +65,8 @@ self.__load() return self.__sha - def writeXml(self, result): - result = result + " \n" + def toXml(self): + result = " \n" result = result + " " + self.md5() + "\n" result = result + " " + self.sha() + "\n" result = result + " " + self.ripe() + "\n" @@ -97,7 +97,7 @@ pass elif not (ext == '.sha1' or ext == '.md5' or ext=='.sha' or ext == '.asc'): document = Document(root, name) - result = document.writeXml(result); + result = result + document.toXml(); if '.svn' in dirs: dirs.remove('.svn') result = result + "" Modified: incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/tests.py URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/tests.py?rev=672498&r1=672497&r2=672498&view=diff ============================================================================== --- incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/tests.py (original) +++ incubator/rat/main/trunk/scan/src/main/org/apache/rat/scan/tests.py Sat Jun 28 04:53:29 2008 @@ -159,7 +159,7 @@ self.assertEquals("2ae73f5cfe7943a7d51b46e653948af7f067a6b01e61c827201c8e17b9231956f48b3e8e0da64e822ca9fdeb7a62f5af623406e2dbb9b39a8dabf569d2046402", self.document.sha()) def testXml(self): - self.assertEquals(" \n c81f4cd3b2203ae869b8c6acea6bf73c\n 2ae73f5cfe7943a7d51b46e653948af7f067a6b01e61c827201c8e17b9231956f48b3e8e0da64e822ca9fdeb7a62f5af623406e2dbb9b39a8dabf569d2046402\n 4b0a5f9317e0d3165ea4982f90e7266a553d8353\n \n", self.document.writeXml("")) + self.assertEquals(" \n c81f4cd3b2203ae869b8c6acea6bf73c\n 2ae73f5cfe7943a7d51b46e653948af7f067a6b01e61c827201c8e17b9231956f48b3e8e0da64e822ca9fdeb7a62f5af623406e2dbb9b39a8dabf569d2046402\n 4b0a5f9317e0d3165ea4982f90e7266a553d8353\n \n", self.document.toXml()) class ScanScannerTest(unittest.TestCase):