Skip to content

Commit 15443b2

Browse files
authored
Merge pull request #1669 from GSA/remove-findings-by-code-analysis
remove code not used; patch evel()
2 parents 11726aa + 4798d71 commit 15443b2

30 files changed

Lines changed: 3 additions & 95790 deletions

.github/workflows/commit.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,6 @@ jobs:
4141
- name: test
4242
run: make validate-proxy
4343

44-
test_importer:
45-
name: test importer
46-
runs-on: ubuntu-latest
47-
steps:
48-
- name: checkout
49-
uses: actions/checkout@v4
50-
- name: setup python
51-
uses: actions/setup-python@v5
52-
with:
53-
python-version: '3.10'
54-
architecture: x64
55-
- name: test_importer
56-
run: make test-import-tool
57-
5844
test_vulnerability:
5945
name: test vulnerability
6046
runs-on: ubuntu-latest

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,6 @@ search-index-rebuild:
132132
copy-src:
133133
docker cp catalog-app_ckan_1:$(CKAN_HOME)/src .
134134

135-
test-import-tool:
136-
cd tools/harvest_source_import && \
137-
pip install pip==20.3.3 && \
138-
pip install -r dev-requirements.txt && \
139-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics && \
140-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics && \
141-
python -m pytest --vcr-record=none tests/
142-
143135
lint-all:
144136
docker compose exec -T ckan \
145137
bash -c "cd $(CKAN_HOME)/src && \

ckan/setup/prerun.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import time
1414
import re
15+
import ast
1516

1617
ckan_ini = os.environ.get("CKAN_INI", "/srv/app/ckan.ini")
1718

@@ -88,8 +89,8 @@ def check_solr_connection(retry=None):
8889
# GSA FIX: convert Solr 'true' to Python 'True'
8990
try:
9091
pythonified = str(connection.text).replace('true', 'True')
91-
eval(pythonified)
92-
except TypeError:
92+
ast.literal_eval(pythonified)
93+
except (ValueError, SyntaxError):
9394
pass
9495

9596

tools/harvest_source_import/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

tools/harvest_source_import/README.md

Lines changed: 0 additions & 184 deletions
This file was deleted.

0 commit comments

Comments
 (0)