Skip to content

Commit

Permalink
create pidfile where it is definitely writeable
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-sahlmann committed Oct 11, 2022
1 parent dac67d2 commit 3d6e208
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mb_netmgmt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with mb-netmgmt. If not, see <https://www.gnu.org/licenses/

"""Network Management Protocols for Mountebank"""
__version__ = "0.0.46"
__version__ = "0.0.47"

import os
import subprocess
Expand All @@ -32,7 +32,8 @@
@contextmanager
def mb(imposters, loglevel="info"):
with subprocess.Popen(
["mb", "--loglevel", loglevel], cwd=os.path.dirname(__file__)
["mb", "--loglevel", loglevel, "--pidfile", "/tmp/mb.pid"],
cwd=os.path.dirname(__file__),
) as mb:
try:
put_imposters("localhost", imposters)
Expand Down

0 comments on commit 3d6e208

Please sign in to comment.