From: Marek 'marx' Grac <mgrac@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 02/15] [cleanup] Proper import of atexit
Date: Wed, 2 Apr 2014 13:52:10 +0200 [thread overview]
Message-ID: <1396439543-29533-2-git-send-email-mgrac@redhat.com> (raw)
In-Reply-To: <1396439543-29533-1-git-send-email-mgrac@redhat.com>
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
next prev parent reply other threads:[~2014-04-02 11:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 11:52 [Cluster-devel] [PATCH 01/15] [cleanup] Add missing spaces and fix tab/spaces indentation Marek 'marx' Grac
2014-04-02 11:52 ` Marek 'marx' Grac [this message]
2014-04-02 11:52 ` [Cluster-devel] [PATCH 03/15] [cleanup] Remove unused variables Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 04/15] [cleanup] Split lines that were too long Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 05/15] [cleanup] Remove unused dependencies Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 06/15] [cleanup] Remove problems with redefining variables/functions Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 07/15] [cleanup] Only symbols that should be used are exported from fencing library Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 08/15] [cleanup] Mark raw strings with r"" Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 09/15] [cleanup] Only symbols that should be used are exported from fencing_snmp library Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 10/15] [cleanup] Errors when encountering mixed space/tab in python Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 11/15] [cleanup] Mark raw strings with r"" in fence_virsh Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 12/15] [cleanup] Remove snmp_define_defaults() Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 13/15] [cleanup] Remove unused arguments Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 14/15] [cleanup] Remove transfer script used in transition 3.x->4.x Marek 'marx' Grac
2014-04-02 11:52 ` [Cluster-devel] [PATCH 15/15] [cleanup] Fix invalid names of variables Marek 'marx' Grac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396439543-29533-2-git-send-email-mgrac@redhat.com \
--to=mgrac@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).