Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
woob
woob
Compare revisions
fcd43011bec36a77d433a59596ea908cb5820832 to 676d78c31229ec4c4a31c3f6a278d812ab7e3d4f
Commits on Source (2)
browser: Avoid crash when no BASEURL is set
· c0b7557b
Laurent Bachelier
authored
Jul 19, 2019
and
hydrargyrum
committed
Sep 10, 2019
It can happen when we just have a bunch of absolute URL classes
c0b7557b
local_run: Avoid race conditions
· 676d78c3
Laurent Bachelier
authored
May 23, 2019
and
hydrargyrum
committed
Sep 10, 2019
676d78c3
Hide whitespace changes
Inline
Side-by-side
tools/local_run.py
View file @
676d78c3
...
...
@@ -5,6 +5,7 @@
import
os
import
subprocess
import
sys
import
tempfile
if
len
(
sys
.
argv
)
<
2
:
print
(
"
Usage: %s SCRIPTNAME [args]
"
%
sys
.
argv
[
0
])
...
...
@@ -38,8 +39,10 @@
os
.
path
.
join
(
os
.
environ
.
get
(
'
XDG_CONFIG_HOME
'
,
os
.
path
.
join
(
os
.
path
.
expanduser
(
'
~
'
),
'
.config
'
)),
'
weboob
'
,
'
backends
'
)))
modpath
=
os
.
getenv
(
'
WEBOOB_MODULES
'
,
os
.
path
.
join
(
project
,
'
modules
'
))
with
open
(
os
.
path
.
join
(
wd
,
'
sources.list
'
),
'
w
'
)
as
f
:
with
tempfile
.
NamedTemporaryFile
(
mode
=
'
w
'
,
dir
=
wd
,
delete
=
False
)
as
f
:
f
.
write
(
"
file://%s
\n
"
%
modpath
)
os
.
rename
(
f
.
name
,
os
.
path
.
join
(
wd
,
'
sources.list
'
))
# Hide output unless there is an error
p
=
subprocess
.
Popen
(
...
...
weboob/browser/browsers.py
View file @
676d78c3
...
...
@@ -710,7 +710,7 @@ def internal_callback(response):
regexp
=
r
'
^(?P<proto>\w+)://.*
'
proto_response
=
re
.
match
(
regexp
,
response
.
url
)
if
proto_response
:
if
proto_response
and
self
.
BASEURL
:
proto_response
=
proto_response
.
group
(
'
proto
'
)
proto_base
=
re
.
match
(
regexp
,
self
.
BASEURL
).
group
(
'
proto
'
)
...
...