]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Update osFactory
authorJohn Dilley <john.dilley@citrix.com>
Thu, 29 Oct 2015 16:07:14 +0000 (16:07 +0000)
committerJohn Dilley <john.dilley@citrix.com>
Thu, 29 Oct 2015 16:07:14 +0000 (16:07 +0000)
exec/xenrt/lib/opsys/__init__.py

index 4d2b9902d0431cc4e5e25042d13798a55e5a497c..5ff5082f7e9daeac166792b6aea62ba905833ef1 100644 (file)
@@ -109,13 +109,10 @@ def registerOS(os):
 
 
 def osFactory(distro, parent, password=None):
-    if not distro:
-        return osFromExisting(parent, password)
-    else:
-        for o in oslist:
-            if o.knownDistro(distro):
-                return o(distro, parent, password)
-        raise xenrt.XRTError("No class found for distro %s" % distro)
+    for o in oslist:
+        if o.knownDistro(distro):
+            return o(distro, parent, password)
+    raise xenrt.XRTError("No class found for distro %s" % distro)
 
 class DetectionState(object):
     def __init__(self, password):