Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.cmdline
Commits
6da9ada3
Commit
6da9ada3
authored
Mar 11, 2020
by
Samuel GAIST
Browse files
[common] Update logger.warn to logger.warning
warn is obsolete.
parent
25e0d637
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/common.py
View file @
6da9ada3
...
...
@@ -264,7 +264,7 @@ class Selector(object):
with
open
(
self
.
path
,
"rt"
)
as
f
:
data
=
simplejson
.
load
(
f
,
object_pairs_hook
=
collections
.
OrderedDict
)
except
simplejson
.
JSONDecodeError
:
logger
.
warn
(
logger
.
warn
ing
(
"invalid state file at `%s' - removing and re-starting..."
,
self
.
path
)
from
beat.core.utils
import
safe_rmfile
...
...
@@ -515,7 +515,7 @@ def display_local_list(prefix, asset_type):
if
"description"
in
contents
:
logger
.
extra
(
2
*
" "
+
contents
[
"description"
])
except
simplejson
.
JSONDecodeError
:
logger
.
warn
(
2
*
" "
+
"(!) invalid JSON file"
)
logger
.
warn
ing
(
2
*
" "
+
"(!) invalid JSON file"
)
if
len
(
names
)
!=
1
:
logger
.
extra
(
"%d %s found"
,
len
(
names
),
TYPE_PLURAL
[
asset_type
])
...
...
@@ -694,7 +694,7 @@ def check_one(prefix, asset_type, name):
if
not
o
.
valid
:
logger
.
info
(
"%s/%s [invalid]"
,
TYPE_PLURAL
[
asset_type
],
name
)
for
e
in
o
.
errors
:
logger
.
warn
(
" * %s"
,
e
)
logger
.
warn
ing
(
" * %s"
,
e
)
return
1
else
:
...
...
@@ -1394,7 +1394,7 @@ def push(
)
if
not
candidates
:
logger
.
warn
(
"No new candidates for upload were found"
)
logger
.
warn
ing
(
"No new candidates for upload were found"
)
return
0
# flush all final candidates
...
...
@@ -1531,7 +1531,7 @@ def dot_diagram(prefix, asset_type, names, path, formats):
return
1
if
not
obj
.
valid
:
logger
.
warn
(
logger
.
warn
ing
(
"%s/%s is not valid - skipping it"
,
TYPE_PLURAL
[
asset_type
],
name
)
continue
...
...
@@ -1539,7 +1539,7 @@ def dot_diagram(prefix, asset_type, names, path, formats):
try
:
diagram
=
obj
.
dot_diagram
()
except
Exception
as
e
:
logger
.
warn
(
logger
.
warn
ing
(
"%s/%s cannot be drawn: %s - skipping it"
,
TYPE_PLURAL
[
asset_type
],
name
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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