e26130a2731e235d5597f3895047380decf1507c
[sliver-openvswitch.git] / ovsdb / ovsdbmonitor / ovsdbmonitor.in
1 #! @PYTHON@
2 # Copyright (c) 2010 Citrix Systems, Inc.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # Version 1.51
17 # 2010-05-07
18
19 import sys
20 sys.path.insert(0, "@ovsdbmonitordir@")
21 sys.path.insert(0, "@abs_top_srcdir@/ovsdb/ovsdbmonitor") # NOINSTALL
22
23 import sys, traceback
24 from pprint import pprint
25 from OVEApp import *
26
27 app = OVEApp()
28 try:
29     retVal = app.enter()
30 except Exception, e:
31     print str(e)
32     try:
33         trace = traceback.format_tb(sys.exc_info()[2])
34     except:
35         trace = ['Traceback not available']
36     print("".join(trace))
37     retVal = 1
38
39 sys.exit(retVal)