Skip to content

Commit

Permalink
Fix ruff errors. (#1754)
Browse files Browse the repository at this point in the history
Co-authored-by: Tommy Beadle
  • Loading branch information
tbeadle authored and doomedraven committed Sep 20, 2023
1 parent 0f42097 commit 9f72942
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dev_utils/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ def mongo_is_cluster():

# Mongodb hooks are registered by importing this module.
# Import it down here because mongo_hooks import this module.
from . import mongo_hooks
from . import mongo_hooks # noqa: F401
3 changes: 1 addition & 2 deletions lib/cuckoo/core/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import modules.processing
import modules.reporting
import modules.signatures
from dev_utils.mongodb import mongo_create_index
from lib.cuckoo.common.colors import cyan, red, yellow
from lib.cuckoo.common.config import Config
from lib.cuckoo.common.constants import CUCKOO_ROOT
Expand Down Expand Up @@ -86,7 +85,7 @@ def check_working_directory():

def check_webgui_mongo():
if repconf.mongodb.enabled:
from dev_utils.mongodb import connect_to_mongo
from dev_utils.mongodb import connect_to_mongo, mongo_create_index

client = connect_to_mongo()
if not client:
Expand Down
9 changes: 1 addition & 8 deletions modules/reporting/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@
try:
from pymongo.errors import InvalidDocument

from dev_utils.mongodb import (
mongo_collection_names,
mongo_create_index,
mongo_delete_data,
mongo_find_one,
mongo_insert_one,
mongo_update_one,
)
from dev_utils.mongodb import mongo_collection_names, mongo_delete_data, mongo_find_one, mongo_insert_one, mongo_update_one

HAVE_MONGO = True
except ImportError:
Expand Down

0 comments on commit 9f72942

Please sign in to comment.