From b27764004644cf6a0190734a03d2b70a82ee908a Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 25 May 2022 06:30:11 +0000 Subject: [PATCH 1/5] update codeQL workflow --- .github/workflows/codeql-analysis.yml | 87 +++++++++++++-------------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9a859e1..438da43 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,14 +1,3 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# name: "CodeQL" on: @@ -16,52 +5,58 @@ on: branches: [ develop, master ] pull_request: # The branches below must be a subset of the branches above - branches: [ develop ] + branches: [ develop ] schedule: + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * - cron: '33 03 * * 5' jobs: - analyze: - name: Analyze + CodeQL-Build: + # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - language: [ 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + permissions: + # required for all workflows + security-events: write + + # only required for workflows in private repositories + actions: read + contents: read steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v3 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + # Override language selection by uncommenting this and choosing your languages + # with: + # languages: go, javascript, csharp, python, cpp, java - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below). + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏️ If the Autobuild fails above, remove it and uncomment the following + # three lines and modify them (or add more) to build your code if your + # project uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file From dbf552f68079703fa8d0e8b895b144456e5c374f Mon Sep 17 00:00:00 2001 From: Jan Speller Date: Wed, 19 Oct 2022 11:40:19 +0000 Subject: [PATCH 2/5] Restart multimon on broken input --- boswatch/inputSource/lineInInput.py | 5 +++++ boswatch/inputSource/pulseaudioInput.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/boswatch/inputSource/lineInInput.py b/boswatch/inputSource/lineInInput.py index 5556d4c..b6b182d 100644 --- a/boswatch/inputSource/lineInInput.py +++ b/boswatch/inputSource/lineInInput.py @@ -48,6 +48,11 @@ class LineInInput(InputBase): if not lineInProc.isRunning: logging.warning("asla was down - try to restart") lineInProc.start() + + if lineInProc.isRunning: + logging.info("rtl_fm is back up - restarting multimon...") + mmProc.setStdin(lineInProc.stdout) + mmProc.start() elif not mmProc.isRunning: logging.warning("multimon was down - try to restart") mmProc.start() diff --git a/boswatch/inputSource/pulseaudioInput.py b/boswatch/inputSource/pulseaudioInput.py index 3b9b42d..7f35667 100644 --- a/boswatch/inputSource/pulseaudioInput.py +++ b/boswatch/inputSource/pulseaudioInput.py @@ -47,6 +47,11 @@ class PulseAudioInput(InputBase): if not PulseAudioProc.isRunning: logging.warning("PulseAudio was down - try to restart") PulseAudioProc.start() + + if PulseAudioProc.isRunning: + logging.info("rtl_fm is back up - restarting multimon...") + mmProc.setStdin(PulseAudioProc.stdout) + mmProc.start() elif not mmProc.isRunning: logging.warning("multimon was down - try to restart") mmProc.start() From c5c45e39d90c8539536fe9c7b65429a67f4071a3 Mon Sep 17 00:00:00 2001 From: Jan Speller Date: Mon, 23 Jan 2023 14:22:08 +0100 Subject: [PATCH 3/5] Fix Method calll to asyncRequests after function was made Private --- plugin/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/http.py b/plugin/http.py index 1af3035..fa14036 100644 --- a/plugin/http.py +++ b/plugin/http.py @@ -72,7 +72,7 @@ class BoswatchPlugin(PluginBase): loop = asyncio.get_event_loop() - future = asyncio.ensure_future(self.asyncRequests(urls)) + future = asyncio.ensure_future(self._asyncRequests(urls)) loop.run_until_complete(future) async def _asyncRequests(self, urls): From aef8d6f46d3b3fc70bfec731ae3d2febba0fd1ee Mon Sep 17 00:00:00 2001 From: Jan Speller Date: Mon, 23 Jan 2023 14:22:25 +0000 Subject: [PATCH 4/5] Limit flake8 to 4.0.1 to fix tests --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 5e215ff..0cca07d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ mkdocs # for develope only pytest pytest-cov +flake8==4.0.1 pytest-flake8 pytest-flakes pytest-randomly From b43f71874f53ae76ca9bbfe431f9085fd16ec218 Mon Sep 17 00:00:00 2001 From: Jan Speller Date: Tue, 24 Jan 2023 10:22:46 +0100 Subject: [PATCH 5/5] Remove Whitespace --- boswatch/inputSource/pulseaudioInput.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boswatch/inputSource/pulseaudioInput.py b/boswatch/inputSource/pulseaudioInput.py index 7f35667..7a4c104 100644 --- a/boswatch/inputSource/pulseaudioInput.py +++ b/boswatch/inputSource/pulseaudioInput.py @@ -47,7 +47,7 @@ class PulseAudioInput(InputBase): if not PulseAudioProc.isRunning: logging.warning("PulseAudio was down - try to restart") PulseAudioProc.start() - + if PulseAudioProc.isRunning: logging.info("rtl_fm is back up - restarting multimon...") mmProc.setStdin(PulseAudioProc.stdout)