Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
6614f362
Commit
6614f362
authored
Jan 17, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改配置文件加载
parent
ecc70110
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
conf.py
coco/conf.py
+3
-4
No files found.
coco/conf.py
View file @
6614f362
...
...
@@ -212,8 +212,8 @@ class Config(dict):
if
self
.
root_path
:
filename
=
os
.
path
.
join
(
self
.
root_path
,
filename
)
try
:
with
open
(
filename
)
as
json_file
:
obj
=
yaml
.
load
(
json_file
)
with
open
(
filename
)
as
f
:
obj
=
yaml
.
load
(
f
)
except
IOError
as
e
:
if
silent
and
e
.
errno
in
(
errno
.
ENOENT
,
errno
.
EISDIR
):
return
False
...
...
@@ -221,8 +221,7 @@ class Config(dict):
raise
if
obj
:
return
self
.
from_mapping
(
obj
)
else
:
return
False
return
True
def
from_mapping
(
self
,
*
mapping
,
**
kwargs
):
"""Updates the config like :meth:`update` ignoring items with non-upper
...
...
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