Minor refactoring of importing osmoappdesc
diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py
index 8a18f84..f9ebde0 100644
--- a/osmopy/osmotestconfig.py
+++ b/osmopy/osmotestconfig.py
@@ -190,12 +190,8 @@
     if args.w:
         workdir = args.w
 
-    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)
 
     apps = osmoappdesc.apps
     configs = osmoappdesc.app_configs
diff --git a/osmopy/osmotestvty.py b/osmopy/osmotestvty.py
old mode 100755
new mode 100644
index f02c610..8d9f3c4
--- a/osmopy/osmotestvty.py
+++ b/osmopy/osmotestvty.py
@@ -27,6 +27,7 @@
 
 
 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 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)
diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py
index 791506d..78465d9 100755
--- a/osmopy/osmoutil.py
+++ b/osmopy/osmoutil.py
@@ -39,12 +39,16 @@
         proc.wait()
 
 
-"""Add a directory to sys.path, try to import a config file.
+"""Add a directory to sys.path, try to import a config file."""
 
-This may throw ImportError if the config file is not found."""
-
-
-def importappconf(dirname, confname):
+def importappconf_or_quit(dirname, confname, p_set):
     if dirname not in sys.path:
         sys.path.append(dirname)
-    return importlib.import_module(confname)
+    try:
+        return importlib.import_module(confname)
+    except ImportError as e:
+        if p_set:
+            print >> sys.stderr, "osmoappdesc not found in %s" % dirname
+        else:
+            print >> sys.stderr, "set osmoappdesc location with -p <dir>"
+        sys.exit(1)