Skip to content

Commit

Permalink
add debug logging if locust-plugins was not found
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Jan 19, 2024
1 parent 54e0001 commit ac13a1a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions locust_swarm/swarm.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
try:
import svs_locust
except ModuleNotFoundError:
# svs-locust is a library that is only used internally at Svenska Spel, please ignore it
# We need to import it here to get some variables and the path to the installed package
pass
import atexit
import logging
import os
Expand Down Expand Up @@ -254,12 +248,18 @@ def upload(server):
import locust_plugins

files.append(os.path.dirname(locust_plugins.__file__))
try:
files.append(os.path.dirname(svs_locust.__file__))
except NameError:
pass
except ImportError:
pass # locust-plugins wasnt installed
except ModuleNotFoundError:
logging.debug("locust-plugins wasnt installed")

try:
# svs-locust is a library that is only used internally at Svenska Spel, please ignore it

import svs_locust

files.append(os.path.dirname(svs_locust.__file__))
except ModuleNotFoundError:
pass

if len(files) > 1:
filestr = "{" + ",".join(files) + "}"
else:
Expand Down

0 comments on commit ac13a1a

Please sign in to comment.