forked from pymedusa/Medusa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store the python version on startup in config (pymedusa#5892)
* Store the python (major) version on startup in config. This can be used to check when a user starts medusa the next time with a different version. * Replace dogpile cache, if we up/down the running python interpreter. * Move the python check to start.py * Update tmdb.py revert * * Moved the logic into the migrate_python_version function * Removed the save_config, as we should depend on the saven on shutdown. * store full semver version, instead of the major version. * Forgot to remove this * Small changes to make code more concise * More specific message
- Loading branch information
Showing
5 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#!/usr/bin/env python2.7 | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -* | ||
"""Script for backwards compatibility.""" | ||
from __future__ import unicode_literals | ||
|
||
import sys | ||
|
||
from medusa.__main__ import main | ||
|
||
if __name__ == '__main__': | ||
if sys.version_info.major == 3 and sys.version_info.minor < 5: | ||
print('Medusa supports Python 2 from version 2.7.10 and Python 3 from version 3.5.0, exiting!') | ||
raise Exception('Incorrect Python version. Shutting down!') | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#!/usr/bin/env python2.7 | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -* | ||
"""Startup script.""" | ||
from __future__ import unicode_literals | ||
|
||
import sys | ||
|
||
from medusa.__main__ import main | ||
|
||
if __name__ == '__main__': | ||
if sys.version_info.major == 3 and sys.version_info.minor < 5: | ||
print('Medusa supports Python 2 from version 2.7.10 and Python 3 from version 3.5.0, exiting!') | ||
raise Exception('Incorrect Python version. Shutting down!') | ||
main() |