Merge branch 'dev'

This commit is contained in:
Ichinga Samuel
2024-11-23 20:31:43 +01:00
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "aiomql" name = "aiomql"
version = "4.0.3" version = "4.0.4"
readme = "README.md" readme = "README.md"
requires-python = ">=3.11" requires-python = ">=3.11"
classifiers = [ classifiers = [
+2 -1
View File
@@ -37,8 +37,9 @@ class Account(_Base, AccountInfo):
""" """
await self.mt5.initialize() await self.mt5.initialize()
self.connected = await self.mt5.login() self.connected = await self.mt5.login()
if not self: if not self.connected:
raise LoginError("Login failed") raise LoginError("Login failed")
await self.refresh()
return self return self
async def __aexit__(self, exc_type, exc_val, exc_tb): async def __aexit__(self, exc_type, exc_val, exc_tb):