use isinstance( obj, basestring) to allow unicode strings

fixes #448
This commit is contained in:
Bob Lantz
2014-11-23 10:59:08 -08:00
parent f0f9907b9d
commit 9a8bdfd765
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -28,9 +28,9 @@ def moduleDeps( subtract=None, add=None ):
add: string or list of module names to add, if not already loaded"""
subtract = subtract if subtract is not None else []
add = add if add is not None else []
if type( subtract ) is str:
if isinstance( subtract, basestring ):
subtract = [ subtract ]
if type( add ) is str:
if isinstance( add, basestring ):
add = [ add ]
for mod in subtract:
if mod in lsmod():