You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2019/09/19 13:52:55 UTC
svn commit: r1867179 -
/comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py
Author: sebb
Date: Thu Sep 19 13:52:55 2019
New Revision: 1867179
URL: http://svn.apache.org/viewvc?rev=1867179&view=rev
Log:
pylint: dangerous default; [] is not needed as a default
Modified:
comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py
Modified: comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py?rev=1867179&r1=1867178&r2=1867179&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/rapp/kibble.py Thu Sep 19 13:52:55 2019
@@ -9,10 +9,10 @@ import re
import os
RAO_HOME = '/var/www/reporter.apache.org'
-with open("/usr/local/etc/tokens/kibble.txt", "r") as f:
- TOKEN = f.read().strip()
+with open("/usr/local/etc/tokens/kibble.txt", "r") as ft:
+ TOKEN = ft.read().strip()
-def stats(project, jira = [], mlid = None):
+def stats(project, jira = None, mlid = None):
BEFORE = int(time.time() - (91*86400))
if not mlid:
mlid = project
@@ -328,7 +328,6 @@ def stats(project, jira = [], mlid = Non
}
}
output = json.dumps(js, indent = 2)
- with open(cache_file, 'w') as f:
- f.write(output)
- f.close()
+ with open(cache_file, 'w') as fc:
+ fc.write(output)
return js
\ No newline at end of file