mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Partly revert c7f2cbd to make stats work again
This commit is contained in:
parent
49ec09a78b
commit
b8e48f32f7
1 changed files with 21 additions and 21 deletions
|
|
@ -27,9 +27,8 @@ from optparse import OptionParser
|
|||
import paramiko
|
||||
import socket
|
||||
import logging
|
||||
|
||||
import common, metadata
|
||||
from common import FDroidPopen
|
||||
import subprocess
|
||||
|
||||
def carbon_send(key, value):
|
||||
s = socket.socket()
|
||||
|
|
@ -121,13 +120,14 @@ def main():
|
|||
logsearch = re.compile(logexpr).search
|
||||
for logfile in glob.glob(os.path.join(logsdir,'access-*.log.gz')):
|
||||
logging.info('...' + logfile)
|
||||
p = FDroidPopen(["zcat", logfile])
|
||||
if options.verbose:
|
||||
print '...' + logfile
|
||||
p = subprocess.Popen(["zcat", logfile], stdout = subprocess.PIPE)
|
||||
matches = (logsearch(line) for line in p.stdout)
|
||||
for match in matches:
|
||||
if match and match.group('statuscode') == '200':
|
||||
uri = match.group('uri')
|
||||
if not uri.endswith('.apk'):
|
||||
continue
|
||||
if uri.endswith('.apk'):
|
||||
_, apkname = os.path.split(uri)
|
||||
app = knownapks.getapp(apkname)
|
||||
if app:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue