incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r615432 - /incubator/public/trunk/connect.py
Date Sat, 26 Jan 2008 07:44:29 GMT
Author: rdonkin
Date: Fri Jan 25 23:44:26 2008
New Revision: 615432

URL: http://svn.apache.org/viewvc?rev=615432&view=rev
Log:
Added license premable

Modified:
    incubator/public/trunk/connect.py

Modified: incubator/public/trunk/connect.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/connect.py?rev=615432&r1=615431&r2=615432&view=diff
==============================================================================
--- incubator/public/trunk/connect.py (original)
+++ incubator/public/trunk/connect.py Fri Jan 25 23:44:26 2008
@@ -27,6 +27,23 @@
 import datetime
 import diff
 
+def addPreamble(xml):
+    return """<?xml version='1.0'?>
+<!-- 
+ 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.
+
+-->\n""" + xml
+
 def outputPath(subject):
     return "audit/" + subject + '-' + datetime.datetime.utcnow().date().isoformat() + ".xml"
 
@@ -79,26 +96,11 @@
 if xml == "":
     print "No results returned"
 else:
-    xml = """<?xml version='1.0'?>
-<!-- 
- 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.
-
--->
-<audit on='""" + datetime.datetime.utcnow().date().isoformat() + "'>" + xml + "</audit>"
+    xml = addPreamble("<audit on='" + datetime.datetime.utcnow().date().isoformat() +
"'>" + xml + "</audit>")
     path = save('incubator', xml)
     subprocess.Popen('gpg --armor --detach-sig ' + path, shell=True).wait()
     
     auditor = diff.Auditor('audit')
     auditor.printSignatureChecks()
-    save('changes', "<?xml version='1.0'?>" + auditor.latestDiffs())
+    save('changes', addPreamble(auditor.latestDiffs()))
     



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message