Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
6746b422
Commit
6746b422
authored
Aug 25, 2015
by
Reinout van Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show cached filename in warnings instead of only the original URL
Fixes #245 mostly
parent
1865f873
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+13
-7
No files found.
src/zc/buildout/buildout.py
View file @
6746b422
...
...
@@ -1570,9 +1570,10 @@ def _open(base, filename, seen, dl_options, override, downloaded):
_dl_options
,
cache
=
_dl_options
.
get
(
'extends-cache'
),
fallback
=
fallback
,
hash_name
=
True
)
is_temp
=
False
cached_filename
=
None
if
_isurl
(
filename
):
path
,
is_temp
=
download
(
filename
)
fp
=
open
(
path
)
cached_filename
,
is_temp
=
download
(
filename
)
fp
=
open
(
cached_filename
)
base
=
filename
[:
filename
.
rfind
(
'/'
)]
elif
_isurl
(
base
):
if
os
.
path
.
isabs
(
filename
):
...
...
@@ -1580,8 +1581,8 @@ def _open(base, filename, seen, dl_options, override, downloaded):
base
=
os
.
path
.
dirname
(
filename
)
else
:
filename
=
base
+
'/'
+
filename
path
,
is_temp
=
download
(
filename
)
fp
=
open
(
path
)
cached_filename
,
is_temp
=
download
(
filename
)
fp
=
open
(
cached_filename
)
base
=
filename
[:
filename
.
rfind
(
'/'
)]
else
:
filename
=
os
.
path
.
join
(
base
,
filename
)
...
...
@@ -1592,16 +1593,21 @@ def _open(base, filename, seen, dl_options, override, downloaded):
if
filename
in
seen
:
if
is_temp
:
fp
.
close
()
os
.
remove
(
path
)
os
.
remove
(
cached_filename
)
raise
zc
.
buildout
.
UserError
(
"Recursive file include"
,
seen
,
filename
)
root_config_file
=
not
seen
seen
.
append
(
filename
)
result
=
zc
.
buildout
.
configparser
.
parse
(
fp
,
filename
,
_default_globals
)
filename_for_logging
=
filename
if
cached_filename
:
filename_for_logging
=
'%s (cached at %s)'
%
(
filename
,
cached_filename
)
result
=
zc
.
buildout
.
configparser
.
parse
(
fp
,
filename_for_logging
,
_default_globals
)
fp
.
close
()
if
is_temp
:
os
.
remove
(
path
)
os
.
remove
(
cached_filename
)
options
=
result
.
get
(
'buildout'
,
{})
extends
=
options
.
pop
(
'extends'
,
None
)
...
...
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