diff options
-rw-r--r-- | sos/policies/__init__.py | 3 | ||||
-rw-r--r-- | sos/sosreport.py | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index b8ed9d47..7b07d57c 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -571,8 +571,7 @@ No changes will be made to system configuration. if match == preset: return self.presets[match] - # Return default preset - return self.presets[""] + return None def probe_preset(self): """Return a ``PresetDefaults`` object matching the runing host. diff --git a/sos/sosreport.py b/sos/sosreport.py index e708961d..3d0ff49d 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -887,7 +887,7 @@ class SoSReport(object): :returns: True on success or False otherwise """ policy = self.policy - if policy.find_preset(name).name is not "": + if policy.find_preset(name): self.ui_log.error("A preset named '%s' already exists" % name) return False @@ -915,7 +915,7 @@ class SoSReport(object): :returns: True on success or False otherwise """ policy = self.policy - if policy.find_preset(name).name is "": + if not policy.find_preset(name): self.ui_log.error("Preset '%s' not found" % name) return False |