44import time
55import asyncio
66
7- from .common import AppConfiguration
7+ from .. common import AppConfiguration
88
9- from .auth .constants import IOS_XBOXBETA_APP_PARAMS , ANDROID_GAMEPASS_BETA_PARAMS
10- from .auth .models import XalClientParameters , XSTSResponse
11- from .auth .xal_auth import XalAuthenticator
12- from .auth .request_signer import RequestSigner
9+ from .. auth .constants import IOS_XBOXBETA_APP_PARAMS , ANDROID_GAMEPASS_BETA_PARAMS
10+ from .. auth .models import XalClientParameters , XSTSResponse
11+ from .. auth .xal_auth import XalAuthenticator
12+ from .. auth .request_signer import RequestSigner
1313
14- from .smartglass_api import SmartglassApi
15- from .xcloud_api import XCloudApi
16- from .xhomestreaming_api import XHomeStreamingApi
14+ from .. smartglass_api import SmartglassApi
15+ from .. xcloud_api import XCloudApi
16+ from .. xhomestreaming_api import XHomeStreamingApi
1717
1818APP_CONFIG_XBOXBETA_FILE = "appconfig.xboxbeta.json"
1919APP_CONFIG_XBOXGAMEPASS_FILE = "appconfig.xboxgamepass.json"
@@ -96,7 +96,7 @@ async def test_xcloud_streaming(
9696 await xhome_api .session .aclose ()
9797
9898
99- async def main (command : str ):
99+ async def async_main (command : str ):
100100 """
101101 Prepare needed values
102102 """
@@ -165,8 +165,7 @@ async def main(command: str):
165165 elif command == 'xcloud' :
166166 await test_xcloud_streaming (config )
167167
168-
169- if __name__ == '__main__' :
168+ def main ():
170169 if len (sys .argv ) < 2 :
171170 print (':: Please provide a command! Choices: smartglass, xhome, xcloud' )
172171 sys .exit (1 )
@@ -176,4 +175,7 @@ async def main(command: str):
176175 print (':: You provided an invalid command!' )
177176 sys .exit (2 )
178177
179- asyncio .run (main (command ))
178+ asyncio .run (async_main (command ))
179+
180+ if __name__ == '__main__' :
181+ main ()
0 commit comments