From 52e55ac06166b90c7f5518f17348a74e196bc086 Mon Sep 17 00:00:00 2001 From: James Adams Date: Mon, 5 Aug 2024 15:53:35 +0100 Subject: [PATCH 1/2] Run PyLint on EL8 and EL9 Python versions --- .github/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index cbd7a3e..63e7ad4 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.6"] + python-version: ["3.6", "3.9"] steps: - uses: actions/checkout@v3 with: From 5fc689641411316ab0487e8fa92341bb5c846ec7 Mon Sep 17 00:00:00 2001 From: James Adams Date: Mon, 5 Aug 2024 15:58:11 +0100 Subject: [PATCH 2/2] Add default values to handle potential logic errors --- aquilon/netbox2aquilon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aquilon/netbox2aquilon.py b/aquilon/netbox2aquilon.py index 95087b1..34705f9 100755 --- a/aquilon/netbox2aquilon.py +++ b/aquilon/netbox2aquilon.py @@ -247,6 +247,9 @@ def netbox_copy(self, opts): """ Copy a device from NetBox to Aquilon """ device = self._netbox_get_device(opts) + aqdesttype = None + aqdestval = None + if opts.sandbox: aqdesttype = 'sandbox' aqdestval = opts.sandbox