Skip to content

Commit

Permalink
chore: fix Path error
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeonus committed Jun 11, 2024
1 parent da1ee03 commit 5f5db6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = flake8,pylint,py37,py38,py39,py310,py311
envlist = flake8,pylint,py37,py38,py39,py310,py311,py312
skipsdist = true # avoid installation
skip_missing_interpreters = true

Expand All @@ -11,7 +11,7 @@ platform =
linux|linux2|darwin|nt|win32|win64
# changedir = {toxinidir}/tradedangerous # ?

[testenv:py{37,38,39,310,311}]
[testenv:py{37,38,39,310,311,312}]
deps = -r requirements-dev.txt
commands =
coverage run --source=tradedangerous -m pytest {posargs}
Expand Down Expand Up @@ -163,3 +163,4 @@ python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
7 changes: 4 additions & 3 deletions tradedangerous/commands/commandenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ def run(self, tdb):
the properties we have are valid.
"""
self.tdb = tdb
if pathlib.Path.exists(pathlib.Path(self.tdb.templatePath, 'database_changes.json')):
db_change = pathlib.Path(self.tdb.templatePath, 'database_changes.json')
if pathlib.Path.exists(db_change):
import ijson
with open(pathlib.Path(self.tdb.templatePath, 'database_changes.json')) as file:
with open(db_change) as file:
for change in ijson.items(file, 'item'):
self.tdb.getDB().execute(change)
Path(self.templatePath, 'database_changes.json').unlink()
db_change.unlink()

self.checkMFD()
self.checkFromToNear()
Expand Down

0 comments on commit 5f5db6e

Please sign in to comment.