Skip to content

Commit

Permalink
improve condition in create_database() method
Browse files Browse the repository at this point in the history
  • Loading branch information
jaedsonpys committed Jan 2, 2023
1 parent 80085af commit 3bcf91d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cookiedb/cookiedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ class instance.

if not self._document.exists_document(database_name):
self._document.create_document(database_name)
else:
if not if_not_exists:
raise exceptions.DatabaseExistsError(f'Database {database_name} already exists.')
elif not if_not_exists:
raise exceptions.DatabaseExistsError(f'Database {database_name} already exists.')

def _get_database_items(self):
try:
Expand Down

0 comments on commit 3bcf91d

Please sign in to comment.