Skip to content

Commit eb2f963

Browse files
Mega: Wait for the mega rest server to start listening before calling the API
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
1 parent a8a2253 commit eb2f963

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bot/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def getConfig(name: str):
9393
MEGA_PASSWORD = getConfig('MEGA_PASSWORD')
9494
# Start megasdkrest binary
9595
subprocess.Popen(["megasdkrest", "--apikey", MEGA_KEY])
96+
time.sleep(3)
9697
mega_client = MegaSdkRestClient('http://localhost:6090')
9798
try:
9899
mega_client.login(MEGA_USERNAME, MEGA_PASSWORD)

0 commit comments

Comments
 (0)