don't close file handlers as rpm will handle it
authorGui Chen <gui.chen@intel.com>
Thu, 10 Oct 2013 02:29:41 +0000 (22:29 -0400)
committerGerrit Code Review <gerrit2@otctools.jf.intel.com>
Tue, 15 Oct 2013 09:26:43 +0000 (02:26 -0700)
as new version of rpm can handle file handlers correctly in most time,
we don't repeat it in mic itself

Change-Id: I48b413e2a3aaf823f306c35e66dcfca7e002306e
Signed-off-by: Gui Chen <gui.chen@intel.com>
plugins/backend/yumpkgmgr.py
plugins/backend/zypppkgmgr.py

index 8a297be..baba380 100644 (file)
@@ -150,14 +150,6 @@ class Yum(BackendPlugin, yum.YumBase):
         yum.YumBase.close(self)
         self.closeRpmDB()
 
-        if not os.path.exists("/etc/fedora-release") and \
-           not os.path.exists("/etc/meego-release"):
-            for i in range(3, os.sysconf("SC_OPEN_MAX")):
-                try:
-                    os.close(i)
-                except:
-                    pass
-
     def __del__(self):
         pass
 
index 01fb503..1b7d8dd 100755 (executable)
@@ -99,14 +99,6 @@ class Zypp(BackendPlugin):
 
         self.closeRpmDB()
 
-        if not os.path.exists("/etc/fedora-release") and \
-           not os.path.exists("/etc/meego-release"):
-            for i in range(3, os.sysconf("SC_OPEN_MAX")):
-                try:
-                    os.close(i)
-                except:
-                    pass
-
     def __del__(self):
         self.close()