Skip to content

Commit

Permalink
Fix bug if no salt files
Browse files Browse the repository at this point in the history
  • Loading branch information
rebkwok committed Apr 22, 2021
1 parent 27d91fd commit 042d086
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.2.4
-----
Fix bug if salt files deleted

0.2.3
-----
Bugfix
Expand Down
2 changes: 1 addition & 1 deletion kpcli/datastructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def setup(self):

def get_password(self):
self.setup()
if self.latest_salt_file.exists() and self.password_file.exists():
if self.latest_salt_file is not None and self.password_file.exists():
timestamp = float(self.latest_salt_file.name.split("_")[-1])
# check timestamp and delete/refresh salt every 24 hrs
if datetime.now().timestamp() - timestamp > self.timeout:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "kpcli"
version = "0.2.3"
version = "0.2.4"
description = "A simple command line tool to interact with KeePassX databases"
authors = ["Becky Smith <rebkwok@gmail.com>"]
license = "GPL-3.0-or-later"
Expand Down

0 comments on commit 042d086

Please sign in to comment.