no log: fix for GA

pull/1403/head^2
morpheus65535 4 years ago
parent 5e30365bc4
commit ea241768b8

@ -46,7 +46,8 @@ def track_event(category=None, action=None, label=None):
session = Session() session = Session()
event = Event(category=category, action=action, label=label, value=1) event = Event(category=category, action=action, label=label, value=1)
tracker.add_custom_variable(CustomVariable(index=1, name='BazarrVersion', value=os.environ["BAZARR_VERSION"], scope=1)) tracker.add_custom_variable(CustomVariable(index=1, name='BazarrVersion',
value=os.environ["BAZARR_VERSION"].lstrip('v'), scope=1))
tracker.add_custom_variable(CustomVariable(index=2, name='PythonVersion', value=platform.python_version(), scope=1)) tracker.add_custom_variable(CustomVariable(index=2, name='PythonVersion', value=platform.python_version(), scope=1))
if settings.general.getboolean('use_sonarr'): if settings.general.getboolean('use_sonarr'):
tracker.add_custom_variable(CustomVariable(index=3, name='SonarrVersion', value=sonarr_version, scope=1)) tracker.add_custom_variable(CustomVariable(index=3, name='SonarrVersion', value=sonarr_version, scope=1))

@ -209,6 +209,7 @@ def get_sonarr_version():
sonarr_version = requests.get(sv, timeout=60, verify=False).json()['version'] sonarr_version = requests.get(sv, timeout=60, verify=False).json()['version']
except Exception: except Exception:
logging.debug('BAZARR cannot get Sonarr version') logging.debug('BAZARR cannot get Sonarr version')
sonarr_version = 'unknown'
return sonarr_version return sonarr_version
@ -247,6 +248,7 @@ def get_radarr_version():
radarr_version = requests.get(rv, timeout=60, verify=False).json()['version'] radarr_version = requests.get(rv, timeout=60, verify=False).json()['version']
except Exception: except Exception:
logging.debug('BAZARR cannot get Radarr version') logging.debug('BAZARR cannot get Radarr version')
radarr_version = 'unknown'
return radarr_version return radarr_version

Loading…
Cancel
Save