src/modules/actions/driver.py
branchs11u3-sru
changeset 3432 489e5c945d1d
parent 2683 920b995f89b0
--- a/src/modules/actions/driver.py	Fri Sep 23 11:46:56 2016 +0530
+++ b/src/modules/actions/driver.py	Fri Sep 23 11:47:00 2016 +0530
@@ -21,7 +21,7 @@
 #
 
 #
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 """module describing a driver packaging object.
@@ -573,21 +573,16 @@
                 # with it.
                 for i in rem_policy:
                         spec = i.split()
+                        if not spec:
+                                continue
+
                         # Test if there is a minor node and if so use it
                         # for the policy removal. Otherwise, if none is
                         # supplied, then use the wild card to match.
-                        if len(spec) == 3:
+                        if "=" not in spec[0]:
                                 minornode = spec[0]
-                        elif len(spec) == 2:
-                                # This can happen when the policy is defined
-                                # in the package manifest without an associated
-                                # minor node.
+                        else:
                                 minornode = "*"
-                        else:
-                                print "driver (%s) update (removal of " \
-                                    "policy '%s') failed: invalid policy " \
-                                    "spec." % (self.attrs["name"], i)
-                                continue
 
                         args = rem_base + ("-p", minornode, self.attrs["name"])
                         self.__call(args, "driver (%(name)s) upgrade (removal "