Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2015-02-01 23:32:03 +0300
committersgiehl <stefan@piwik.org>2015-02-01 23:32:03 +0300
commit8b5ee0af07ba6e708075734805b3647f217dd938 (patch)
treee5440cd6c4e7fcc69316ea7ccd5c85ffd6ee600d /misc
parent24c2af513050b419d469cf419077fdd0ef6c6158 (diff)
parentc3b7f1e582d4089363e0d44022a7c88d5a3e12f3 (diff)
Merge branch 'master' into move_language_report
Conflicts: CHANGELOG.md
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/log-analytics/import_logs.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py
index a3036dde56..1ad9654fe8 100755
--- a/misc/log-analytics/import_logs.py
+++ b/misc/log-analytics/import_logs.py
@@ -1457,13 +1457,20 @@ class Recorder(object):
'token_auth': config.options.piwik_token_auth,
'requests': [self._get_hit_args(hit) for hit in hits]
}
- piwik.call(
+ result = piwik.call(
'/piwik.php', args={},
expected_content=None,
headers={'Content-type': 'application/json'},
data=data,
on_failure=self._on_tracking_failure
)
+
+ # make sure the request succeeded and returned valid json
+ try:
+ result = json.loads(result)
+ except ValueError, e:
+ fatal_error("Incorrect response from tracking API: '%s'\nIs the BulkTracking plugin disabled?" % result)
+
stats.count_lines_recorded.advance(len(hits))
def _on_tracking_failure(self, response, data):