Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: sitescripts/reports/bin/updateDigests.py

Issue 4805960266678272: Issue 1244 - Remove unused modules from sitescripts.reports imports (Closed)
Patch Set: Created Aug. 14, 2014, 2:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sitescripts/reports/bin/processReports.py ('k') | sitescripts/reports/web/showDigest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This file is part of the Adblock Plus web scripts, 3 # This file is part of the Adblock Plus web scripts,
4 # Copyright (C) 2006-2014 Eyeo GmbH 4 # Copyright (C) 2006-2014 Eyeo GmbH
5 # 5 #
6 # Adblock Plus is free software: you can redistribute it and/or modify 6 # Adblock Plus is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 3 as 7 # it under the terms of the GNU General Public License version 3 as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
9 # 9 #
10 # Adblock Plus is distributed in the hope that it will be useful, 10 # Adblock Plus is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details. 13 # GNU General Public License for more details.
14 # 14 #
15 # You should have received a copy of the GNU General Public License 15 # You should have received a copy of the GNU General Public License
16 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 16 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
17 17
18 import MySQLdb, hashlib, sys, os, re 18 import os, re
19 from time import time 19 from time import time
20 from email.utils import parseaddr 20 from email.utils import parseaddr
21 from sitescripts.utils import get_config, get_template, setupStderr 21 from sitescripts.utils import get_config, get_template, setupStderr
22 from sitescripts.reports.utils import getReports, getReportSubscriptions, calcul ateReportSecret, getDigestPath, getUserUsefulnessScore 22 from sitescripts.reports.utils import getReports, getReportSubscriptions, calcul ateReportSecret, getDigestPath, getUserUsefulnessScore
23 import sitescripts.subscriptions.subscriptionParser as subscriptionParser 23 import sitescripts.subscriptions.subscriptionParser as subscriptionParser
24 24
25 def updateDigests(dir): 25 def updateDigests(dir):
26 global currentTime 26 global currentTime
27 27
28 subs = subscriptionParser.readSubscriptions() 28 subs = subscriptionParser.readSubscriptions()
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 sub = { 96 sub = {
97 'name': subscription.name, 97 'name': subscription.name,
98 'type': subscription.type 98 'type': subscription.type
99 } 99 }
100 return sub 100 return sub
101 101
102 if __name__ == '__main__': 102 if __name__ == '__main__':
103 setupStderr() 103 setupStderr()
104 currentTime = time() 104 currentTime = time()
105 updateDigests(get_config().get('reports', 'digestPath')) 105 updateDigests(get_config().get('reports', 'digestPath'))
OLDNEW
« no previous file with comments | « sitescripts/reports/bin/processReports.py ('k') | sitescripts/reports/web/showDigest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld