neuter_tracking.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233
  1. --- a/src/classes/metrics.py 2018-09-22 18:49:41.000000000 -0300
  2. +++ b/src/classes/metrics.py 2019-02-08 08:53:21.561261422 -0400
  3. @@ -163,10 +163,11 @@ def send_metric(params):
  4. url_params = urllib.parse.urlencode(metric_params)
  5. url = "http://www.google-analytics.com/collect?%s" % url_params
  6. - # Send metric HTTP data
  7. + # Send metric HTTP data (disabled)
  8. try:
  9. - r = requests.get(url, headers={"user-agent": user_agent}, verify=False)
  10. - log.info("Track metric: [%s] %s | (%s bytes)" % (r.status_code, r.url, len(r.content)))
  11. + # r = requests.get(url, headers={"user-agent": user_agent}, verify=False)
  12. + # log.info("Track metric: [%s] %s | (%s bytes)" % (r.status_code, r.url, len(r.content)))
  13. + log.info("Tracking disabled")
  14. except Exception as Ex:
  15. log.error("Failed to Track metric: %s" % (Ex))
  16. @@ -191,10 +192,11 @@ def send_exception(stacktrace, source):
  17. "unique_install_id": s.get("unique_install_id")})
  18. url = "http://www.openshot.org/exception/json/"
  19. - # Send exception HTTP data
  20. + # Send exception HTTP data (disabled)
  21. try:
  22. - r = requests.post(url, data=data, headers={"user-agent": user_agent, "content-type": "application/x-www-form-urlencoded"}, verify=False)
  23. - log.info("Track exception: [%s] %s | %s" % (r.status_code, r.url, r.text))
  24. + # r = requests.post(url, data=data, headers={"user-agent": user_agent, "content-type": "application/x-www-form-urlencoded"}, verify=False)
  25. + # log.info("Track exception: [%s] %s | %s" % (r.status_code, r.url, r.text))
  26. + log.info("Tracking disabled")
  27. except Exception as Ex:
  28. log.error("Failed to Track exception: %s" % (Ex))