check for websockets version
This commit is contained in:
parent
bbf565f809
commit
1c736f8afe
|
@ -16,18 +16,25 @@ while True:
|
||||||
break
|
break
|
||||||
except ImportError:
|
except ImportError:
|
||||||
aioconsole = None
|
aioconsole = None
|
||||||
print('Required python module "aioconsole" not found, press enter to install it')
|
input('Required python module "aioconsole" not found, press enter to install it')
|
||||||
input()
|
|
||||||
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'aioconsole'])
|
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'aioconsole'])
|
||||||
|
|
||||||
while True:
|
websockets = None
|
||||||
|
|
||||||
|
while not websockets:
|
||||||
try:
|
try:
|
||||||
import websockets
|
import websockets
|
||||||
break
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
websockets = None
|
websockets = None
|
||||||
print('Required python module "websockets" not found, press enter to install it')
|
input('Required python module "websockets" not found, press enter to install it')
|
||||||
input()
|
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'websockets'])
|
||||||
|
else:
|
||||||
|
version = websockets.__version__
|
||||||
|
if type(version) == str:
|
||||||
|
version = tuple(int(part) for part in version.split("."))
|
||||||
|
if version < (8,1):
|
||||||
|
websockets = None
|
||||||
|
input('Required python module "websockets" too old, press enter to upgrade it')
|
||||||
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'websockets'])
|
subprocess.call([sys.executable, '-m', 'pip', 'install', '--upgrade', 'websockets'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -29,3 +29,6 @@ Mystery.py
|
||||||
* Defaults to generating a non-race ROM (Bonta's only makes race ROMs at this time)
|
* Defaults to generating a non-race ROM (Bonta's only makes race ROMs at this time)
|
||||||
* If a race ROM is desired, pass --create-race as argument to it
|
* If a race ROM is desired, pass --create-race as argument to it
|
||||||
* When an error is generated due to a broken .yaml file, it now mentions in the error trace which file it is
|
* When an error is generated due to a broken .yaml file, it now mentions in the error trace which file it is
|
||||||
|
|
||||||
|
MultiClient.py
|
||||||
|
* Update websockets if it is too old, preventing a crash when trying to connect
|
Loading…
Reference in New Issue