Skip to content
GitLab
Menu
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
93f4860e
Commit
93f4860e
authored
May 24, 2018
by
Samuel Gaist
Browse files
[common] Unified logger.error calls
Make them follow the style used by other logger calls.
parent
3fed6c19
Pipeline
#20461
passed with stages
in 24 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/common.py
View file @
93f4860e
...
...
@@ -398,7 +398,7 @@ def make_up_local_list(prefix, type, requirements):
try
:
root
=
os
.
path
.
join
(
prefix
,
TYPE_NOSTORAGE
[
type
])
except
:
logger
.
error
(
"Selected type is not valid: %s"
%
type
)
logger
.
error
(
"Selected type is not valid: %s"
,
type
)
return
1
l
=
glob
.
glob
(
os
.
path
.
join
(
root
,
TYPE_GLOB
[
type
]))
...
...
@@ -506,7 +506,7 @@ def display_local_path(prefix, type, names):
try
:
selected_type
=
TYPE_PLURAL
[
type
]
except
:
logger
.
error
(
"Selected type is not valid: %s"
%
type
)
logger
.
error
(
"Selected type is not valid: %s"
,
type
)
return
1
else
:
selected_type
=
TYPE_NOSTORAGE
[
type
]
...
...
@@ -553,7 +553,7 @@ def edit_local_file(prefix, editor, type, name):
try
:
selected_type
=
TYPE_PLURAL
[
type
]
except
:
logger
.
error
(
"Selected type is not valid: %s"
%
type
)
logger
.
error
(
"Selected type is not valid: %s"
,
type
)
return
1
else
:
selected_type
=
TYPE_NOSTORAGE
[
type
]
...
...
@@ -567,7 +567,7 @@ def edit_local_file(prefix, editor, type, name):
elif
type
in
json_objects
:
ext
=
".json"
else
:
logger
.
error
(
"Selected type is not valid: %s"
%
type
)
logger
.
error
(
"Selected type is not valid: %s"
,
type
)
root
=
os
.
path
.
join
(
prefix
,
selected_type
)
object_path
=
os
.
path
.
join
(
root
,
name
+
ext
)
...
...
@@ -586,10 +586,10 @@ def edit_local_file(prefix, editor, type, name):
cmd
=
"%s %s"
%
(
editor
,
object_path
)
os
.
system
(
cmd
)
else
:
logger
.
error
(
"Not a valid file: %s"
%
object_path
)
logger
.
error
(
"Not a valid file: %s"
,
object_path
)
return
1
except
:
logger
.
error
(
"File does not exist: %s"
%
object_path
)
logger
.
error
(
"File does not exist: %s"
,
object_path
)
return
1
return
0
...
...
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