From 4da7b3b7f048979657926942c3d0a8624dce46d0 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 18 Mar 2015 15:31:40 -0700 Subject: [PATCH] Fix exception for unknown class --- mininet/util.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mininet/util.py b/mininet/util.py index 91fcfd0..6eff84d 100644 --- a/mininet/util.py +++ b/mininet/util.py @@ -530,8 +530,7 @@ def customClass( classes, argStr ): """ cname, args, kwargs = splitArgs( argStr ) cls = classes.get( cname, None ) - - if not cname: + if not cls: raise Exception( "error: %s is unknown - please specify one of %s" % ( cname, classes.keys() ) ) if not args and not kwargs: