aboutsummaryrefslogtreecommitdiffstats
path: root/osmopy/osmotestvty.py
diff options
context:
space:
mode:
Diffstat (limited to 'osmopy/osmotestvty.py')
-rw-r--r--[-rwxr-xr-x]osmopy/osmotestvty.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/osmopy/osmotestvty.py b/osmopy/osmotestvty.py
index f02c610..8d9f3c4 100755..100644
--- a/osmopy/osmotestvty.py
+++ b/osmopy/osmotestvty.py
@@ -27,6 +27,7 @@ confpath = '.'
class TestVTY(unittest.TestCase):
+
def setUp(self):
osmo_vty_cmd = osmoappdesc.vty_command[:]
config_index = osmo_vty_cmd.index('-c')
@@ -90,12 +91,8 @@ if __name__ == '__main__':
if args.p:
confpath = args.p
- osmoappdesc = None
- try:
- osmoappdesc = osmoutil.importappconf(confpath, "osmoappdesc")
- except ImportError as e:
- print >> sys.stderr, "osmoappdesc not found, set searchpath with -p"
- sys.exit(1)
+ osmoappdesc = osmoutil.importappconf_or_quit(confpath, "osmoappdesc",
+ args.p)
print "confpath %s, workdir %s" % (confpath, workdir)
os.chdir(workdir)