mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
safely hide the python code part from shell parsers
This works around a syntax warning emitted by the continuous integration tool. This commit encloses the python part of the hybrid shell / python script within a "here" document.
This commit is contained in:
parent
1c281c61d9
commit
612ebf5ae9
1 changed files with 8 additions and 0 deletions
|
@ -61,6 +61,10 @@ else
|
||||||
python "$0" "$@"
|
python "$0" "$@"
|
||||||
fi
|
fi
|
||||||
exit $?
|
exit $?
|
||||||
|
|
||||||
|
# For shell: ignore everything starting from here until the last line of this file.
|
||||||
|
# This is necessary for syntax checkers that try to complain about invalid shell syntax below.
|
||||||
|
true <<EOF
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -338,3 +342,7 @@ if __name__ == "__main__":
|
||||||
remote = get_clean_fieldname(link["remote"])
|
remote = get_clean_fieldname(link["remote"])
|
||||||
print("multigraph olsr_neighbour_ping.host_{remote}".format(remote=remote))
|
print("multigraph olsr_neighbour_ping.host_{remote}".format(remote=remote))
|
||||||
print("neighbour_{remote}.value {value:.4f}".format(remote=remote, value=ping_time))
|
print("neighbour_{remote}.value {value:.4f}".format(remote=remote, value=ping_time))
|
||||||
|
|
||||||
|
# final marker for shell / python hybrid script (see "Interpreter Selection")
|
||||||
|
EOF = True
|
||||||
|
EOF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue