Module: check_mk
Branch: master
Commit: 0fa46f7b862a7747c06a97f6e4135d39114a507a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0fa46f7b862a77…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 7 11:13:28 2016 +0100
agent_tinkerforge: removed install logic (tinkerforge bindings are now installed with
CMK)
---
agents/special/agent_tinkerforge | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/agents/special/agent_tinkerforge b/agents/special/agent_tinkerforge
index 96daa62..fd70f26 100755
--- a/agents/special/agent_tinkerforge
+++ b/agents/special/agent_tinkerforge
@@ -65,33 +65,6 @@ import sys
import os
-def install():
- dest = os.path.dirname(os.path.realpath(__file__))
- print("installing tinkerforge python api to %s" % dest)
- if os.path.exists(os.path.join(dest, "tinkerforge")):
- print("already installed")
- return 1
-
- import urllib2
- import shutil
- from fnmatch import fnmatch
- from zipfile import ZipFile
- from cStringIO import StringIO
- url =
"http://download.tinkerforge.com/bindings/python/tinkerforge_python_bindings_latest.zip"
- response = urllib2.urlopen(url)
- buf = StringIO(response.read())
- z = ZipFile(buf)
-
- extract_files = [f for f in z.namelist() if
f.startswith("source/tinkerforge")]
- z.extractall(dest, extract_files)
-
- shutil.move(os.path.join(dest, "source", "tinkerforge"),
- os.path.join(dest, "tinkerforge"))
- shutil.rmtree(os.path.join(dest, "source"))
-
- return 0
-
-
DEFAULT_SETTINGS = {
'host': "localhost",
'port': 4223,
@@ -271,8 +244,6 @@ def main():
parser.add_option("--segment_display_brightness", type=int,
dest="brightness",
default=settings['segment_display_brightness'],
help="brightness of the 7-segment display (0-7)")
- parser.add_option("--install", action="store_true",
- help="install tinkerforge python api to same directory as the
plugin")
(options, args) = parser.parse_args()
@@ -283,9 +254,6 @@ def main():
'segment_display_brightness': options.brightness
}
- if options.install:
- return install()
-
try:
from tinkerforge.ip_connection import IPConnection
except ImportError: