diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index cf68cbbf..f9c14f10 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -1,13 +1,14 @@ name: Code Quality Checks -on: [push] +on: [push, pull_request] jobs: black: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Black uses: psf/black@stable with: options: "--check" + src: "./conpot/*" diff --git a/conpot/core/__init__.py b/conpot/core/__init__.py index 8622cdf0..96fa95fe 100644 --- a/conpot/core/__init__.py +++ b/conpot/core/__init__.py @@ -41,6 +41,7 @@ def get_databus(): def get_session(*args, **kwargs): return sessionManager.get_session(*args, **kwargs) + def delete_session(*args, **kwargs): return sessionManager.delete_session(*args, **kwargs) diff --git a/conpot/core/session_manager.py b/conpot/core/session_manager.py index 170c6f83..b9a51cf0 100644 --- a/conpot/core/session_manager.py +++ b/conpot/core/session_manager.py @@ -60,7 +60,7 @@ def delete_session(self, id): if session.id == id: del self._sessions[i] break - + def purge_sessions(self): # there is no native purge/clear mechanism for gevent queues, so... self.log_queue = Queue()