mirror of
https://github.com/CMiksche/gitea-auto-update
synced 2025-12-10 07:57:23 +01:00
feat: add restriction for python 3
Add a restriction for python 3 so that installing this software with python 2 isn't possible. Should fix GH-10.
This commit is contained in:
@@ -7,6 +7,7 @@ All rights reserved.
|
||||
License: GNU General Public License
|
||||
'''
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
import configparser
|
||||
import fire
|
||||
@@ -74,8 +75,12 @@ def updater(settings='settings.ini'):
|
||||
config.get('Gitea', 'tmpDir'),
|
||||
config.get('Gitea', 'system'))
|
||||
|
||||
|
||||
def main():
|
||||
if not sys.version_info[0] == 3:
|
||||
sys.exit("Sorry, Python 2 is not supported. Please update to Python 3.")
|
||||
fire.Fire(updater)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user