[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 02/15] [cleanup] Proper import of atexit



Previously atexit library was imported only from the fencing library.
---
 fence/agents/alom/fence_alom.py                 | 1 +
 fence/agents/amt/fence_amt.py                   | 1 +
 fence/agents/apc/fence_apc.py                   | 1 +
 fence/agents/apc_snmp/fence_apc_snmp.py         | 1 +
 fence/agents/bladecenter/fence_bladecenter.py   | 1 +
 fence/agents/brocade/fence_brocade.py           | 1 +
 fence/agents/cisco_mds/fence_cisco_mds.py       | 1 +
 fence/agents/cisco_ucs/fence_cisco_ucs.py       | 1 +
 fence/agents/drac/fence_drac.py                 | 1 +
 fence/agents/drac5/fence_drac5.py               | 1 +
 fence/agents/dummy/fence_dummy.py               | 1 +
 fence/agents/eaton_snmp/fence_eaton_snmp.py     | 1 +
 fence/agents/eps/fence_eps.py                   | 1 +
 fence/agents/hds_cb/fence_hds_cb.py             | 1 +
 fence/agents/hpblade/fence_hpblade.py           | 1 +
 fence/agents/ibmblade/fence_ibmblade.py         | 1 +
 fence/agents/ifmib/fence_ifmib.py               | 1 +
 fence/agents/ilo/fence_ilo.py                   | 1 +
 fence/agents/ilo_mp/fence_ilo_mp.py             | 1 +
 fence/agents/intelmodular/fence_intelmodular.py | 1 +
 fence/agents/ipdu/fence_ipdu.py                 | 1 +
 fence/agents/ipmilan/fence_ipmilan.py           | 1 +
 fence/agents/ldom/fence_ldom.py                 | 1 +
 fence/agents/lib/fencing.py.py                  | 2 +-
 fence/agents/lpar/fence_lpar.py                 | 1 +
 fence/agents/netio/fence_netio.py               | 1 +
 fence/agents/ovh/fence_ovh.py                   | 1 +
 fence/agents/rhevm/fence_rhevm.py               | 1 +
 fence/agents/rsa/fence_rsa.py                   | 1 +
 fence/agents/rsb/fence_rsb.py                   | 1 +
 fence/agents/sanbox2/fence_sanbox2.py           | 1 +
 fence/agents/virsh/fence_virsh.py               | 1 +
 fence/agents/vmware/fence_vmware.py             | 1 +
 fence/agents/vmware_soap/fence_vmware_soap.py   | 1 +
 fence/agents/wti/fence_wti.py                   | 1 +
 fence/agents/xenapi/fence_xenapi.py             | 1 +
 36 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/fence/agents/alom/fence_alom.py b/fence/agents/alom/fence_alom.py
index 7a7e38e..ae484a4 100644
--- a/fence/agents/alom/fence_alom.py
+++ b/fence/agents/alom/fence_alom.py
@@ -6,6 +6,7 @@
 # as found on SUN T2000 Niagara
 
 import sys, re, pexpect, time, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/amt/fence_amt.py b/fence/agents/amt/fence_amt.py
index 71288e0..55e3e5b 100644
--- a/fence/agents/amt/fence_amt.py
+++ b/fence/agents/amt/fence_amt.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, subprocess, re, os, stat
+import atexit
 from pipes import quote
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py
index da1b6b8..451c616 100644
--- a/fence/agents/apc/fence_apc.py
+++ b/fence/agents/apc/fence_apc.py
@@ -15,6 +15,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py
index 1e44ae6..971919a 100644
--- a/fence/agents/apc_snmp/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -10,6 +10,7 @@
 # - Tripplite PDUMH20HVNET 12.04.0055 - SNMP v1, v2c, v3
 
 import sys
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
diff --git a/fence/agents/bladecenter/fence_bladecenter.py b/fence/agents/bladecenter/fence_bladecenter.py
index 6eeaeb4..d3a0301 100644
--- a/fence/agents/bladecenter/fence_bladecenter.py
+++ b/fence/agents/bladecenter/fence_bladecenter.py
@@ -13,6 +13,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/brocade/fence_brocade.py b/fence/agents/brocade/fence_brocade.py
index 53b4573..b7a197e 100644
--- a/fence/agents/brocade/fence_brocade.py
+++ b/fence/agents/brocade/fence_brocade.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/cisco_mds/fence_cisco_mds.py b/fence/agents/cisco_mds/fence_cisco_mds.py
index 2428dcf..2bd6eae 100644
--- a/fence/agents/cisco_mds/fence_cisco_mds.py
+++ b/fence/agents/cisco_mds/fence_cisco_mds.py
@@ -7,6 +7,7 @@
 #   with BIOS 1.0.16, kickstart 4.1(1c), system 4.1(1c)
 
 import sys, re
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index 50c1cb8..debefb4 100644
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -2,6 +2,7 @@
 
 import sys, re
 import pycurl, StringIO
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/drac/fence_drac.py b/fence/agents/drac/fence_drac.py
index c2b2acc..90314f4 100644
--- a/fence/agents/drac/fence_drac.py
+++ b/fence/agents/drac/fence_drac.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/drac5/fence_drac5.py b/fence/agents/drac5/fence_drac5.py
index 6ce0586..20e2e8a 100644
--- a/fence/agents/drac5/fence_drac5.py
+++ b/fence/agents/drac5/fence_drac5.py
@@ -13,6 +13,7 @@
 #####
 
 import sys, re, pexpect, exceptions, time
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/dummy/fence_dummy.py b/fence/agents/dummy/fence_dummy.py
index 1f9ddf1..cc136d4 100644
--- a/fence/agents/dummy/fence_dummy.py
+++ b/fence/agents/dummy/fence_dummy.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, re, pexpect, exceptions, random
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/eaton_snmp/fence_eaton_snmp.py b/fence/agents/eaton_snmp/fence_eaton_snmp.py
index 462d541..0497c75 100644
--- a/fence/agents/eaton_snmp/fence_eaton_snmp.py
+++ b/fence/agents/eaton_snmp/fence_eaton_snmp.py
@@ -7,6 +7,7 @@
 #   EATON | Powerware ePDU model: Switched ePDU (IPV3600), firmware: 2.0.K
 
 import sys
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
diff --git a/fence/agents/eps/fence_eps.py b/fence/agents/eps/fence_eps.py
index 6f2c6da..6e7cc1e 100644
--- a/fence/agents/eps/fence_eps.py
+++ b/fence/agents/eps/fence_eps.py
@@ -5,6 +5,7 @@
 
 import sys, re
 import httplib, base64, string, socket
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/hds_cb/fence_hds_cb.py b/fence/agents/hds_cb/fence_hds_cb.py
index 9bdf083..d8046b1 100755
--- a/fence/agents/hds_cb/fence_hds_cb.py
+++ b/fence/agents/hds_cb/fence_hds_cb.py
@@ -11,6 +11,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/hpblade/fence_hpblade.py b/fence/agents/hpblade/fence_hpblade.py
index 238e549..e2de148 100644
--- a/fence/agents/hpblade/fence_hpblade.py
+++ b/fence/agents/hpblade/fence_hpblade.py
@@ -7,6 +7,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/ibmblade/fence_ibmblade.py b/fence/agents/ibmblade/fence_ibmblade.py
index 1787ae2..4567861 100644
--- a/fence/agents/ibmblade/fence_ibmblade.py
+++ b/fence/agents/ibmblade/fence_ibmblade.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
diff --git a/fence/agents/ifmib/fence_ifmib.py b/fence/agents/ifmib/fence_ifmib.py
index eabcbe9..ec5ab0c 100644
--- a/fence/agents/ifmib/fence_ifmib.py
+++ b/fence/agents/ifmib/fence_ifmib.py
@@ -9,6 +9,7 @@
 #   Only lance if is visible
 
 import sys
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py
index 779b9a5..a04aacf 100644
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -12,6 +12,7 @@
 #####
 
 import sys, re, pexpect
+import atexit
 from xml.sax.saxutils import quoteattr
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
diff --git a/fence/agents/ilo_mp/fence_ilo_mp.py b/fence/agents/ilo_mp/fence_ilo_mp.py
index 23aa8cc..5bb234b 100644
--- a/fence/agents/ilo_mp/fence_ilo_mp.py
+++ b/fence/agents/ilo_mp/fence_ilo_mp.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/intelmodular/fence_intelmodular.py b/fence/agents/intelmodular/fence_intelmodular.py
index 35091a0..d569d74 100644
--- a/fence/agents/intelmodular/fence_intelmodular.py
+++ b/fence/agents/intelmodular/fence_intelmodular.py
@@ -12,6 +12,7 @@
 # Thanks Matthew Kent for original agent and testing.
 
 import sys
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 from fencing_snmp import *
diff --git a/fence/agents/ipdu/fence_ipdu.py b/fence/agents/ipdu/fence_ipdu.py
index 7f08656..b90a333 100644
--- a/fence/agents/ipdu/fence_ipdu.py
+++ b/fence/agents/ipdu/fence_ipdu.py
@@ -6,6 +6,7 @@
 #
 
 import sys
+import atexit
 sys.path.append("/usr/share/fence")
 from fencing import *
 from fencing_snmp import *
diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py
index 0cea62b..ab5a75a 100644
--- a/fence/agents/ipmilan/fence_ipmilan.py
+++ b/fence/agents/ipmilan/fence_ipmilan.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, shlex, stat, subprocess, re, os
+import atexit
 from pipes import quote
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
diff --git a/fence/agents/ldom/fence_ldom.py b/fence/agents/ldom/fence_ldom.py
index acddffe..1bf1c49 100644
--- a/fence/agents/ldom/fence_ldom.py
+++ b/fence/agents/ldom/fence_ldom.py
@@ -8,6 +8,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 9ef3c8e..41f9087 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 
 import sys, getopt, time, os, uuid, pycurl, stat
-import pexpect, re, atexit, syslog
+import pexpect, re, syslog
 import __main__
 
 ## do not add code here.
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index 8a8b50d..c4237f2 100644
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -11,6 +11,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/netio/fence_netio.py b/fence/agents/netio/fence_netio.py
index 3cbf489..71c3014 100755
--- a/fence/agents/netio/fence_netio.py
+++ b/fence/agents/netio/fence_netio.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/ovh/fence_ovh.py b/fence/agents/ovh/fence_ovh.py
index 7d4b6bc..6becd8e 100644
--- a/fence/agents/ovh/fence_ovh.py
+++ b/fence/agents/ovh/fence_ovh.py
@@ -10,6 +10,7 @@
 
 import sys, time
 import shutil, tempfile
+import atexit
 from datetime import datetime
 from suds.client import Client
 from suds.xsd.doctor import ImportDoctor, Import
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index 1ed05d5..e4a11de 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -2,6 +2,7 @@
 
 import sys, re
 import pycurl, StringIO
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py
index 7135573..992c5e6 100644
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -8,6 +8,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/rsb/fence_rsb.py b/fence/agents/rsb/fence_rsb.py
index 08af873..6c5e119 100755
--- a/fence/agents/rsb/fence_rsb.py
+++ b/fence/agents/rsb/fence_rsb.py
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/sanbox2/fence_sanbox2.py b/fence/agents/sanbox2/fence_sanbox2.py
index 6f320b1..86b646b 100644
--- a/fence/agents/sanbox2/fence_sanbox2.py
+++ b/fence/agents/sanbox2/fence_sanbox2.py
@@ -9,6 +9,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py
index 1ec5310..0ebf668 100644
--- a/fence/agents/virsh/fence_virsh.py
+++ b/fence/agents/virsh/fence_virsh.py
@@ -6,6 +6,7 @@
 #
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/vmware/fence_vmware.py b/fence/agents/vmware/fence_vmware.py
index 551337e..c6209e8 100644
--- a/fence/agents/vmware/fence_vmware.py
+++ b/fence/agents/vmware/fence_vmware.py
@@ -23,6 +23,7 @@
 #
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
index 7ce9016..cd56f9f 100644
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
@@ -3,6 +3,7 @@
 import sys, exceptions, time
 import shutil, tempfile, suds
 import logging
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 
 from suds.client import Client
diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py
index 227e4b4..5157335 100644
--- a/fence/agents/wti/fence_wti.py
+++ b/fence/agents/wti/fence_wti.py
@@ -12,6 +12,7 @@
 #####
 
 import sys, re, pexpect, exceptions
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 
diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py
index 81ebb96..509dd8b 100644
--- a/fence/agents/xenapi/fence_xenapi.py
+++ b/fence/agents/xenapi/fence_xenapi.py
@@ -32,6 +32,7 @@
 # whether I should continue support for it. mattjclark0407 at hotmail dot com
 
 import sys
+import atexit
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import *
 import XenAPI
-- 
1.9.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]