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
5dc1cc7f
Commit
5dc1cc7f
authored
May 23, 2018
by
Flavio TARSETTI
Browse files
[common] fix typo around %
parent
88a0b919
Pipeline
#20455
canceled with stages
in 27 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/common.py
View file @
5dc1cc7f
...
@@ -398,7 +398,7 @@ def make_up_local_list(prefix, type, requirements):
...
@@ -398,7 +398,7 @@ def make_up_local_list(prefix, type, requirements):
try
:
try
:
root
=
os
.
path
.
join
(
prefix
,
TYPE_NOSTORAGE
[
type
])
root
=
os
.
path
.
join
(
prefix
,
TYPE_NOSTORAGE
[
type
])
except
:
except
:
logger
.
error
(
"Selected type is not valid: %s"
%
type
)
logger
.
error
(
"Selected type is not valid: %s"
%
type
)
return
1
return
1
l
=
glob
.
glob
(
os
.
path
.
join
(
root
,
TYPE_GLOB
[
type
]))
l
=
glob
.
glob
(
os
.
path
.
join
(
root
,
TYPE_GLOB
[
type
]))
...
@@ -553,7 +553,7 @@ def edit_local_file(prefix, editor, type, name):
...
@@ -553,7 +553,7 @@ def edit_local_file(prefix, editor, type, name):
try
:
try
:
selected_type
=
TYPE_PLURAL
[
type
]
selected_type
=
TYPE_PLURAL
[
type
]
except
:
except
:
logger
.
error
(
"Selected type is not valid: %s"
%
type
)
logger
.
error
(
"Selected type is not valid: %s"
%
type
)
return
1
return
1
else
:
else
:
selected_type
=
TYPE_NOSTORAGE
[
type
]
selected_type
=
TYPE_NOSTORAGE
[
type
]
...
@@ -567,7 +567,7 @@ def edit_local_file(prefix, editor, type, name):
...
@@ -567,7 +567,7 @@ def edit_local_file(prefix, editor, type, name):
elif
type
in
json_objects
:
elif
type
in
json_objects
:
ext
=
".json"
ext
=
".json"
else
:
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
)
root
=
os
.
path
.
join
(
prefix
,
selected_type
)
object_path
=
os
.
path
.
join
(
root
,
name
+
ext
)
object_path
=
os
.
path
.
join
(
root
,
name
+
ext
)
...
@@ -586,10 +586,10 @@ def edit_local_file(prefix, editor, type, name):
...
@@ -586,10 +586,10 @@ def edit_local_file(prefix, editor, type, name):
cmd
=
"%s %s"
%
(
editor
,
object_path
)
cmd
=
"%s %s"
%
(
editor
,
object_path
)
os
.
system
(
cmd
)
os
.
system
(
cmd
)
else
:
else
:
logger
.
error
(
"Not a valid file: %s"
%
object_path
)
logger
.
error
(
"Not a valid file: %s"
%
object_path
)
return
1
return
1
except
:
except
:
logger
.
error
(
"File does not exist: %s"
%
object_path
)
logger
.
error
(
"File does not exist: %s"
%
object_path
)
return
1
return
1
return
0
return
0
...
...
Write
Preview
Supports
Markdown
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