-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathappHandler.py
More file actions
26 lines (24 loc) · 1.11 KB
/
appHandler.py
File metadata and controls
26 lines (24 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os
import json
import requests
from modules.updater import updaterMethods
#from modules.logo import showLogo
###lets check for updater
class appHandler():
@staticmethod
def startHandling():
globalVersion = updaterMethods.getGlobalVersion()
localVersion = updaterMethods.currentVersion('config.json')
if not globalVersion or not localVersion:
print('something went wrong may be yoir data connction broken down')
else:
if not updaterMethods.isUpdatedVersion(globalVersion,localVersion):
print('new update is avilable')
usersChoiceAboutAutoUpdate = updaterMethods.showOptionsAndGetChoice()
if (usersChoiceAboutAutoUpdate):
if usersChoiceAboutAutoUpdate in ["1","01"]:
updaterMethods.triggerUpdate()
elif usersChoiceAboutAutoUpdate in ["02","2"]:
print('updates are paused for now ')
elif usersChoiceAboutAutoUpdate in ["03","3"]:
updaterMethods.openChangeLogs()