From 23142d46bca6218ee1ed337dce643f13c649fe51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Sun, 17 Jul 2011 17:56:42 +0000 Subject: [PATCH] Check for a valid wspy_dissectors disectory to avoid a warning if missing. svn path=/trunk/; revision=38070 --- epan/wspython/register-dissector.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epan/wspython/register-dissector.py b/epan/wspython/register-dissector.py index 6faab57f6f..8a983e6f3b 100755 --- a/epan/wspython/register-dissector.py +++ b/epan/wspython/register-dissector.py @@ -56,6 +56,11 @@ def register_dissectors(dir): libws = get_libws_handle() dissectors_dir = os.path.join(dir, "wspy_dissectors") + + #Check if we have the dissectors directory + if not os.path.isdir(dissectors_dir): + return [] + #append dir to be able to import python dissectors sys.path.append(dissectors_dir)