diff mbox

python/semanage: Remove redundant and broken moduleRecords.modify()

Message ID 20180111174427.24529-1-vmojzis@redhat.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Vit Mojzis Jan. 11, 2018, 5:44 p.m. UTC
moduleRecords.modify() calls nonexistent function
semanage_module_update_file (maybe it should have been
semanage_module_upgrade_file which is now obsolete and calls
semanage_module_install_file) and the job of updating a module is done
by moduleRecords.add().

Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
---
 python/semanage/seobject.py | 5 -----
 1 file changed, 5 deletions(-)

Comments

Stephen Smalley Jan. 16, 2018, 2:45 p.m. UTC | #1
On Thu, 2018-01-11 at 18:44 +0100, Vit Mojzis wrote:
> moduleRecords.modify() calls nonexistent function
> semanage_module_update_file (maybe it should have been
> semanage_module_upgrade_file which is now obsolete and calls
> semanage_module_install_file) and the job of updating a module is
> done
> by moduleRecords.add().
> 
> Signed-off-by: Vit Mojzis <vmojzis@redhat.com>

Thanks, applied.

> ---
>  python/semanage/seobject.py | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/python/semanage/seobject.py
> b/python/semanage/seobject.py
> index b927b18..740bd7c 100644
> --- a/python/semanage/seobject.py
> +++ b/python/semanage/seobject.py
> @@ -423,11 +423,6 @@ class moduleRecords(semanageRecords):
>                      raise ValueError(_("Could not disable module
> %s") % m)
>          self.commit()
>  
> -    def modify(self, file):
> -        rc = semanage_module_update_file(self.sh, file)
> -        if rc >= 0:
> -            self.commit()
> -
>      def delete(self, module, priority):
>          rc = semanage_set_default_priority(self.sh, priority)
>          if rc < 0:
diff mbox

Patch

diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py
index b927b18..740bd7c 100644
--- a/python/semanage/seobject.py
+++ b/python/semanage/seobject.py
@@ -423,11 +423,6 @@  class moduleRecords(semanageRecords):
                     raise ValueError(_("Could not disable module %s") % m)
         self.commit()
 
-    def modify(self, file):
-        rc = semanage_module_update_file(self.sh, file)
-        if rc >= 0:
-            self.commit()
-
     def delete(self, module, priority):
         rc = semanage_set_default_priority(self.sh, priority)
         if rc < 0: