mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01: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
@ -61,6 +61,10 @@ else
|
||||
python "$0" "$@"
|
||||
fi
|
||||
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"])
|
||||
print("multigraph olsr_neighbour_ping.host_{remote}".format(remote=remote))
|
||||
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…
Reference in New Issue
Block a user