Check for a valid wspy_dissectors disectory to avoid a warning if missing.

svn path=/trunk/; revision=38070
This commit is contained in:
Stig Bjørlykke 2011-07-17 17:56:42 +00:00
parent 155ac876de
commit 23142d46bc
1 changed files with 5 additions and 0 deletions

View File

@ -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)