OpenSecurity/bin/terminate_client_tray.pyw
author Oliver Maurhart <oliver.maurhart@ait.ac.at>
Wed, 29 Oct 2014 15:18:22 +0100
changeset 240 d7ef04254e9c
parent 226 107dc235508f
permissions -rw-r--r--
lizenz fixed in all files
     1 # -*- coding: utf-8 -*-
     2 
     3 # ------------------------------------------------------------
     4 # terminate the client tray
     5 # 
     6 # Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
     7 #
     8 # Copyright 2013-2014 X-Net and AIT Austrian Institute of Technology
     9 # 
    10 # 
    11 #     X-Net Services GmbH
    12 #     Elisabethstrasse 1
    13 #     4020 Linz
    14 #     AUSTRIA
    15 #     https://www.x-net.at
    16 # 
    17 #     AIT Austrian Institute of Technology
    18 #     Donau City Strasse 1
    19 #     1220 Wien
    20 #     AUSTRIA
    21 #     http://www.ait.ac.at
    22 # 
    23 # 
    24 # Licensed under the Apache License, Version 2.0 (the "License");
    25 # you may not use this file except in compliance with the License.
    26 # You may obtain a copy of the License at
    27 # 
    28 #    http://www.apache.org/licenses/LICENSE-2.0
    29 # 
    30 # Unless required by applicable law or agreed to in writing, software
    31 # distributed under the License is distributed on an "AS IS" BASIS,
    32 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    33 # See the License for the specific language governing permissions and
    34 # limitations under the License.
    35 # ------------------------------------------------------------
    36 
    37 
    38 # ------------------------------------------------------------
    39 # imports
    40 
    41 import urllib2
    42 
    43 
    44 # ------------------------------------------------------------
    45 # code
    46 
    47 
    48 # start
    49 if __name__ == "__main__":
    50 
    51     try:
    52 
    53         # TODO: HARDCODED ADDRESS OF OPENSECURITY CLIENT TRAY
    54         browsing_vm = urllib2.urlopen('http://127.0.0.1:8090/quit').readline()
    55         print('Called http://127.0.0.1:8090/quit')
    56         
    57     except Exception as e:
    58         print('Failed: %s' % (e.message))
    59         
    60