Commit c3de274e authored by echel0n's avatar echel0n

Updated requirements

Added multiple methods to help install requirements.txt
Updating fails if installing/updating requirements fails
parent 99e28af8
# Changelog
- * f095e92 - 2018-12-01: Pre-Release v9.4.48.dev2
- * bbf52a5 - 2018-12-01: Updated requirements Added multiple methods to help install requirements.txt Updating fails if installing/updating requirements fails
- * 99e28af - 2018-12-01: Pre-Release v9.4.48.dev2
- * bb367fd - 2018-11-30: Adding shows from trakt or imdb now prompt for show settings.
- * 23e7005 - 2018-11-30: Pre-Release v9.4.48.dev1
- * b266867 - 2018-11-29: Release v9.4.47
......
APScheduler == 3.5.0
APScheduler == 3.5.3
babelfish == 0.5.5
bencode == 1.0
CacheControl == 0.12.3
CacheControl == 0.12.5
cfscrape == 1.9.5
configobj == 5.0.6
feedparser == 5.2.1
guessit == 2.1.4
guessit == 3.0.3
hachoir_core == 1.3.3
hachoir_metadata == 1.3.3
hachoir_parser == 1.3.4
jsonrpclib == 0.1.7
Mako == 1.0.7
markdown2 == 2.3.3
markdown2 == 2.3.6
oauth2 == 1.9.0.post1
profilehooks == 1.9.0
Send2Trash == 1.4.2
profilehooks == 1.10.0
Send2Trash == 1.5.0
six == 1.11.0
subliminal == 2.0.5
tornado == 4.5.2
tornado == 5.1.1
xmltodict == 0.11.0
MultipartPostHandler == 0.1.0
beautifulsoup4 == 4.6.0
python_dateutil == 2.6.0
beautifulsoup4 == 4.6.3
python_dateutil == 2.7.5
pynzb == 0.1.0
futures == 3.2.0
gntp == 1.0.3
python_twitter == 3.3
pyxdg == 0.25
urllib3 == 1.22
python_twitter == 3.5
pyxdg == 0.26
urllib3 == 1.24.1
py-unrar2 == 0.99.6
lockfile == 0.12.2
requests == 2.18.4
requests == 2.20.1
codernitydb == 0.5.0
fake-useragent == 0.1.8
fake-useragent == 0.1.11
html5lib == 1.0.1
arrow == 0.10.0
unidecode == 0.4.21
twilio == 6.10.0
arrow == 0.12.1
unidecode == 1.0.23
twilio == 6.21.0
chardet == 3.0.4
pytz == 2017.3
pytz == 2018.7
tzlocal == 2.0.0b1
raven == 6.7.0
python-keycloak-client == 0.1.3
simplejson == 3.15.0
raven == 6.9.0
python-keycloak-client == 0.2.0
simplejson == 3.16.0
service_identity == 17.0.0
certifi
pyasn1
lxml
ipaddress
psutil
cffi
\ No newline at end of file
cffi
......@@ -18,7 +18,6 @@
from __future__ import unicode_literals
import io
import os
import platform
import re
......@@ -377,9 +376,22 @@ class UpdateManager(object):
return "{}/home/update/?pid={}".format(sickrage.app.config.web_root, sickrage.app.pid)
def install_requirements(self):
__, __, exit_status = self._pip_cmd(self._pip_path,
'install --no-cache-dir --user -r {}'.format(sickrage.REQS_FILE))
return (False, True)[exit_status == 0]
for req_file in ['requirements.txt', sickrage.REQS_FILE]:
__, __, exit_status = self._pip_cmd(self._pip_path,
'install --no-cache-dir -r {}'.format(req_file))
if exit_status != 0:
__, __, exit_status = self._pip_cmd(self._pip_path,
'install --no-cache-dir --user -r {}'.format(req_file))
if exit_status == 0:
return True
sickrage.app.log.warning('Unable to update requirements using {req_file}'.format(**{
'req_file': sickrage.REQS_FILE
}))
return False
class GitUpdateManager(UpdateManager):
......@@ -475,8 +487,7 @@ class GitUpdateManager(UpdateManager):
sickrage.app.alerts.message(_('Updater'),
_('Updating SiCKRAGE from GIT servers'))
Notifiers.mass_notify_version_update(self.get_newest_version)
self.install_requirements()
return True
return self.install_requirements()
return False
......@@ -520,8 +531,7 @@ class GitUpdateManager(UpdateManager):
__, __, exit_status = self._git_cmd(self._git_path, 'checkout -f ' + branch)
if exit_status == 0:
self.install_requirements()
return True
return self.install_requirements()
return False
......@@ -648,7 +658,8 @@ class SourceUpdateManager(UpdateManager):
os.renames(old_path, new_path)
# install requirements
self.install_requirements()
if not self.install_requirements():
return False
except Exception as e:
sickrage.app.log.error("Error while trying to update: {}".format(e))
return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment