Merge pull request #1 from gprst/credentials-error-from-pykeepass

Credentials error from pykeepass
This commit is contained in:
David Němec 2020-12-25 17:52:44 +01:00 committed by GitHub
commit a18eb06705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ make build
```
## Run/usage
- First you will need to **create new (empty) KeePass database** (tested with [KeePassXC](https://github.com/keepassxreboot/keepassxc) but it will probably work with others)
- You can either **create new (empty) KeePass database** (tested with [KeePassXC](https://github.com/keepassxreboot/keepassxc) but it will probably work with others) right now, otherwise one will be created when the script is executed
- Go into the virtual environment
```
source .venv/bin/activate

View File

@ -7,7 +7,7 @@ from argparse import ArgumentParser
from shlex import quote
from pykeepass import PyKeePass, create_database
from pykeepass.exceptions import CredentialsIntegrityError
from pykeepass.exceptions import CredentialsError
from item import Item, Types as ItemTypes
@ -20,7 +20,7 @@ def bitwarden_to_keepass(args):
except FileNotFoundError:
logging.info('KeePass database does not exist, creating a new one.')
kp = create_database(args.database_path, password=args.database_password, keyfile=args.database_keyfile)
except CredentialsIntegrityError as e:
except CredentialsError as e:
logging.error(f'Wrong password for KeePass database: {e}')
return