diff --git a/plexpy/versioncheck.py b/plexpy/versioncheck.py index 59fced5f..33f2b917 100644 --- a/plexpy/versioncheck.py +++ b/plexpy/versioncheck.py @@ -24,6 +24,7 @@ import json import os import platform import re +import shutil import subprocess import tarfile @@ -327,8 +328,12 @@ def update(): for line in output.split('\n'): if 'Already up-to-date.' in line or 'Already up to date.' in line: logger.info('No update available, not updating') + return elif line.endswith(('Aborting', 'Aborting.')): logger.error('Unable to update from git: ' + line) + return + + clean_pyc() elif plexpy.INSTALL_TYPE == 'source': tar_download_url = 'https://github.com/{}/{}/tarball/{}'.format(plexpy.CONFIG.GIT_USER, @@ -390,6 +395,8 @@ def update(): ) return + clean_pyc() + def reset_git_install(): if plexpy.INSTALL_TYPE == 'git': @@ -543,3 +550,24 @@ def read_changelog(latest_only=False, since_prev_release=False): except IOError as e: logger.error('Tautulli Version Checker :: Unable to open changelog file. %s' % e) return '