Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
132
Issues
132
List
Boards
Labels
Milestones
Merge Requests
40
Merge Requests
40
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
weboob
weboob
Commits
a19af187
Commit
a19af187
authored
Nov 08, 2019
by
Laurent Bachelier
🐧
Committed by
Romain Bignon
Nov 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: Better logging
Shorter messages and to the point, also show when saved.
parent
67aaee03
Pipeline
#2768
failed with stages
in 1 minute and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
yamlconfig.py
weboob/tools/config/yamlconfig.py
+4
-3
No files found.
weboob/tools/config/yamlconfig.py
View file @
a19af187
...
...
@@ -66,14 +66,14 @@ class YamlConfig(IConfig):
def
load
(
self
,
default
=
{}):
self
.
values
=
default
.
copy
()
LOGGER
.
debug
(
u'Loading
application
configuration file:
%
s.'
%
self
.
path
)
LOGGER
.
debug
(
u'Loading configuration file:
%
s.'
%
self
.
path
)
try
:
with
open
(
self
.
path
,
'r'
)
as
f
:
self
.
values
=
yaml
.
load
(
f
,
Loader
=
self
.
LOADER
)
LOGGER
.
debug
(
u'
Application c
onfiguration file loaded:
%
s.'
%
self
.
path
)
LOGGER
.
debug
(
u'
C
onfiguration file loaded:
%
s.'
%
self
.
path
)
except
IOError
:
self
.
save
()
LOGGER
.
debug
(
u'
Application configuration file created with default values:
%
s. Please customize it
.'
%
self
.
path
)
LOGGER
.
debug
(
u'
Configuration file created with default values:
%
s
.'
%
self
.
path
)
if
self
.
values
is
None
:
self
.
values
=
{}
...
...
@@ -87,6 +87,7 @@ class YamlConfig(IConfig):
with
f
:
yaml
.
dump
(
self
.
values
,
f
,
Dumper
=
self
.
DUMPER
,
default_flow_style
=
False
)
replace
(
f
.
name
,
self
.
path
)
LOGGER
.
debug
(
u'Configuration file saved:
%
s.'
%
self
.
path
)
def
get
(
self
,
*
args
,
**
kwargs
):
v
=
self
.
values
...
...
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