]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Fixed exception handling in getTemplate
authorDan Lamping <daniel.lamping@citrix.com>
Mon, 16 Nov 2015 12:11:27 +0000 (12:11 +0000)
committerDan Lamping <daniel.lamping@citrix.com>
Mon, 16 Nov 2015 12:11:27 +0000 (12:11 +0000)
exec/xenrt/lib/xenserver/host.py

index 66eaba89e5ebddaea5402410c1bfa76805d16323..364b9d3180b8f79ac974809085b5222b72d6dd31 100755 (executable)
@@ -6663,13 +6663,11 @@ fi
                         template = self.chooseTemplate(\
                             "TEMPLATE_NAME_SLES_%s_64" % (v))
                     else:
-                        template = self.chooseTemplate(\
-                                                   "TEMPLATE_NAME_SLES_%s" % (v))
+                        template = self.chooseTemplate("TEMPLATE_NAME_SLES_%s" % (v))
             elif re.search(r"sled\d+", distro):
                 v = re.search(r"sled(\d+)", distro).group(1)
                 if arch and arch == "x86-64":
-                    template = self.chooseTemplate(\
-                            "TEMPLATE_NAME_SLED_%s_64" % (v))
+                    template = self.chooseTemplate("TEMPLATE_NAME_SLED_%s_64" % (v))
                 else:
                     template = self.chooseTemplate("TEMPLATE_NAME_SLED_%s" % (v))
             elif re.search(r"sl7", distro):
@@ -6723,7 +6721,7 @@ fi
                                     (distro))
                 template = self.chooseTemplate("TEMPLATE_NAME_RHEL_5")
             else:
-                raise e
+                raise
 
         return template