Skip to content

Commit b25cda8

Browse files
committed
Merge branch 'dev-git.wur' into main-git.wur
2 parents f467ed2 + fff6f24 commit b25cda8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

linkcheck/linkchecker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def check_url(self, url):
5757
if 'content-length' in response. headers:
5858
content_size = int(response.headers['content-length'])
5959
elif 'content-range' in response.headers:
60-
range_header = response.headers['range-header']
60+
range_header = response.headers['content-range']
6161
if 'bytes' in range_header and '/' in range_header:
6262
content_size = int(range_header.split('/')[-1])
6363

@@ -107,7 +107,8 @@ def setup_database():
107107
cur = conn.cursor()
108108

109109
# Drop existing tables
110-
cur.execute("DROP TABLE IF EXISTS records CASCADE")
110+
if os.environ.get("POSTGRES_SCHEMA"): # else it will drop the records table from public
111+
cur.execute("DROP TABLE IF EXISTS records CASCADE")
111112
cur.execute("DROP TABLE IF EXISTS links CASCADE")
112113
cur.execute("DROP TABLE IF EXISTS validation_history CASCADE")
113114

linkcheck/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ requests
22
beautifulsoup4
33
psycopg2-binary
44
asyncpg
5-
linkchecker
65
databases
76
python-dotenv
87
lxml

0 commit comments

Comments
 (0)