Skip to content

Commit

Permalink
fixed toml export write
Browse files Browse the repository at this point in the history
  • Loading branch information
avycado13 committed Jun 12, 2023
1 parent 913d84a commit 7bd896a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
'passwordgenerator',
'SQLAlchemy==1.4.41',
'sqlcipher3==0.4.5',
'tomli >= 1.1.0 ; python_version < "3.11"'
'tomli >= 1.1.0 ; python_version < "3.11"',
'tomli-w'

], # external dependencies
entry_points={
Expand Down
4 changes: 2 additions & 2 deletions src/views/import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import tomllib as toml
except ModuleNotFoundError:
import tomli as toml

import tomli_w
from tabulate import tabulate

from . import menu, secrets, categories
Expand Down Expand Up @@ -97,7 +97,7 @@ def export_to_toml(path):
'category': categories.get_name(secret.category_id),
})

return save_file(path, toml.dumps(out))
return save_file(path, tomli_w.dumps(out))


def import_from_json(path=None, rows=None):
Expand Down

0 comments on commit 7bd896a

Please sign in to comment.