Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MJU-POPS
ckanext-archiver
Commits
81584f3f
Commit
81584f3f
authored
Jan 05, 2018
by
Marko Kuder
Browse files
fix 'thread._local' object has no attribute 'host'
parent
0ebe8439
Changes
1
Hide whitespace changes
Inline
Side-by-side
ckanext/archiver/tasks.py
View file @
81584f3f
...
...
@@ -10,8 +10,10 @@ import shutil
import
datetime
import
copy
import
mimetypes
import
routes
import
re
import
time
import
urlparse
from
requests.packages
import
urllib3
...
...
@@ -34,6 +36,12 @@ def load_config(ckan_ini_filepath):
import
ckan
ckan
.
config
.
environment
.
load_environment
(
conf
.
global_conf
,
conf
.
local_conf
)
## give routes enough information to run url_for
parsed
=
urlparse
.
urlparse
(
conf
.
get
(
'ckan.site_url'
,
'http://0.0.0.0'
))
request_config
=
routes
.
request_config
()
request_config
.
host
=
parsed
.
netloc
+
parsed
.
path
request_config
.
protocol
=
parsed
.
scheme
def
register_translator
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment