mirror of
https://github.com/vladmandic/automatic
synced 2026-09-03 19:40:47 +02:00
version check handler
This commit is contained in:
@@ -310,7 +310,10 @@ def check_version():
|
||||
ver = git('log -1 --pretty=format:"%h %ad"')
|
||||
log.info(f'Version: {ver}')
|
||||
hash = git('rev-parse HEAD')
|
||||
import requests
|
||||
try:
|
||||
import requests
|
||||
except ImportError:
|
||||
return
|
||||
logging.getLogger("urllib3").setLevel(logging.WARNING)
|
||||
commits = requests.get('https://api.github.com/repos/vladmandic/automatic/branches/master').json()
|
||||
if commits['commit']['sha'] != hash:
|
||||
|
||||
Reference in New Issue
Block a user