community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1867031 - in /comdev/projects.apache.org/trunk/site: edit/save.py make_doap.py
Date Mon, 16 Sep 2019 22:41:48 GMT
Author: sebb
Date: Mon Sep 16 22:41:48 2019
New Revision: 1867031

URL: http://svn.apache.org/viewvc?rev=1867031&view=rev
Log:
Pylint

Modified:
    comdev/projects.apache.org/trunk/site/edit/save.py
    comdev/projects.apache.org/trunk/site/make_doap.py

Modified: comdev/projects.apache.org/trunk/site/edit/save.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/site/edit/save.py?rev=1867031&r1=1867030&r2=1867031&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/site/edit/save.py (original)
+++ comdev/projects.apache.org/trunk/site/edit/save.py Mon Sep 16 22:41:48 2019
@@ -1,9 +1,8 @@
 #!/usr/bin/env python
 
 import os
-import cgi;
-import json;
-import smtplib;
+import cgi
+import json
 import re
 from email.mime.text import MIMEText
 from subprocess import Popen, PIPE
@@ -12,7 +11,7 @@ print ("Content-Type: text/html\r\n\r\n"
 print ("Received!")
 
 try:
-    form = cgi.FieldStorage();
+    form = cgi.FieldStorage()
     user = os.environ['HTTP_X_AUTHENTICATED_USER'] if 'HTTP_X_AUTHENTICATED_USER' in os.environ
else "nobody"
     f = form['file'].value if 'file' in form else None
 

Modified: comdev/projects.apache.org/trunk/site/make_doap.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/site/make_doap.py?rev=1867031&r1=1867030&r2=1867031&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/site/make_doap.py (original)
+++ comdev/projects.apache.org/trunk/site/make_doap.py Mon Sep 16 22:41:48 2019
@@ -24,7 +24,7 @@ formData = (
     [ 'dl',       'download-page', 'rdf:resource', 1 ],
     [ 'lang',     'programming-language' ],
     [ 'cat',      'category',      'rdf:resource', 0, 'http://projects.apache.org/category/%s'
],
-);
+)
 
 def addData(val, line):
     fields = len(line)
@@ -58,8 +58,6 @@ projName = re.sub(r"[^\w-]", '_', projNa
 
 thehomepage = makeURL(form.getvalue('homepage','www.apache.org'))
 
-dict = {'projName' : projName, 'dt': dt, 'thehomepage': thehomepage}
-
 print("""Content-type: application/rdf+xml
 Content-Disposition: attachment; filename=doap_%(projName)s
 
@@ -88,7 +86,8 @@ Content-Disposition: attachment; filenam
 -->
   <Project rdf:about="%(thehomepage)s">
     <created>%(dt)s</created>
-    <license rdf:resource="http://spdx.org/licenses/Apache-2.0" />""" % dict)
+    <license rdf:resource="http://spdx.org/licenses/Apache-2.0" />""" 
+    % {'projName' : projName, 'dt': dt, 'thehomepage': thehomepage} )
 
 for line in formData:
     field = line[0]



Mime
View raw message