1
0
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:
Christoph Miksche
2019-09-02 13:45:57 +02:00
parent d291779fa7
commit 3828e07d90
2 changed files with 7 additions and 1 deletions

View File

@@ -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()