switch to use hashlib

This commit is contained in:
sfaulds 2016-11-03 16:46:22 +11:00
parent e34734931d
commit aa99b1a3c3
2 changed files with 5 additions and 5 deletions

View file

@ -4,7 +4,7 @@ import traceback
import requests
import logging
import clientinfo
import md5
import hashlib
import xbmc
import platform
import xbmcgui
@ -59,8 +59,8 @@ class GoogleAnalytics():
self.user_name = settings('username') or settings('connectUsername') or 'None'
# use md5 for client and user for analytics
self.device_id = md5.new(self.device_id).hexdigest()
self.user_name = md5.new(self.user_name).hexdigest()
self.device_id = hashlib.md5(self.device_id).hexdigest()
self.user_name = hashlib.md5(self.user_name).hexdigest()
# resolution
self.screen_mode = xbmc.getInfoLabel("System.ScreenMode")

View file

@ -20,7 +20,7 @@ import videonodes
import websocket_client as wsc
from utils import window, settings, dialog, language as lang
from ga_client import GoogleAnalytics
import md5
import hashlib
#################################################################################################
@ -160,7 +160,7 @@ class Service(object):
serverId = settings('serverId')
if(serverId != None):
serverId = md5.new(serverId).hexdigest()
serverId = hashlib.md5(serverId).hexdigest()
ga = GoogleAnalytics()
ga.sendEventData("Application", "Startup", serverId)