Skip to content

Commit

Permalink
Black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
oh2fih committed Aug 14, 2022
1 parent faa66c8 commit ed57a3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
16 changes: 6 additions & 10 deletions lib/DatabasePlugins/mongodb.py
Expand Up @@ -37,11 +37,7 @@ def __init__(self):

if USERNAME and PASSWORD and DNSSRV is True:
mongoURI = "mongodb+srv://{username}:{password}@{host}/{db}?authSource={auth}&retryWrites=true&w=majority".format(
username=USERNAME,
password=PASSWORD,
host=HOST,
db=DATABASE,
auth=AUTH
username=USERNAME, password=PASSWORD, host=HOST, db=DATABASE, auth=AUTH
)
elif USERNAME and PASSWORD:
mongoURI = "mongodb://{username}:{password}@{host}:{port}/{db}?authSource={auth}".format(
Expand All @@ -50,13 +46,11 @@ def __init__(self):
host=HOST,
port=PORT,
db=DATABASE,
auth=AUTH
auth=AUTH,
)
else:
mongoURI = "mongodb://{host}:{port}/{db}".format(
host=HOST,
port=PORT,
db=DATABASE
host=HOST, port=PORT, db=DATABASE
)

connect = pymongo.MongoClient(mongoURI, connect=False)
Expand All @@ -65,7 +59,9 @@ def __init__(self):
self.user_store = connect[DATABASE]["mgmt_users"]

for each in self.connection.list_collection_names():
setattr(self, f"store_{each}", Collection(database=self.connection, name=each))
setattr(
self, f"store_{each}", Collection(database=self.connection, name=each)
)

def create_schema(self, **kwargs):
pass
Expand Down
1 change: 0 additions & 1 deletion lib/User.py
Expand Up @@ -28,7 +28,6 @@ def __init__(self, id, auth_instance):
if not auth_instance.isCVESearchUser(id):
raise UserNotFoundError()
self.authenticator = auth_instance


def authenticate(self, password):
return self.authenticator.validateUser(self.id, password)
Expand Down
2 changes: 1 addition & 1 deletion web/VERSION
@@ -1 +1 @@
4.2.1
4.2.1.dev15

0 comments on commit ed57a3e

Please sign in to comment.