aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stokes <adam.stokes@ubuntu.com>2013-04-14 12:28:36 -0400
committerAdam Stokes <adam.stokes@ubuntu.com>2013-04-14 12:28:36 -0400
commit50fd0cef8ae76c920fc2f09af5cc4e8dc149e9e7 (patch)
treedb404b8b8c2f8be560f96a1823e4b164adaaa66e
parent3a2bffa7e4958af38e63d75deef6cd29a110c985 (diff)
downloadsos-50fd0cef8ae76c920fc2f09af5cc4e8dc149e9e7.tar.gz
Fix imports in correct files
sos/archive.py: - Archive uses selinux module but wasn't included sos/policies/__init__: - sys.exit called without sys import Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r--sos/archive.py5
-rw-r--r--sos/policies/__init__.py1
-rw-r--r--sos/utilities.py4
3 files changed, 6 insertions, 4 deletions
diff --git a/sos/archive.py b/sos/archive.py
index f837c600..f1b0b057 100644
--- a/sos/archive.py
+++ b/sos/archive.py
@@ -28,6 +28,11 @@ import re
from subprocess import Popen, PIPE, STDOUT
try:
+ import selinux
+except ImportError:
+ pass
+
+try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index 8148c894..522aaff5 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -5,6 +5,7 @@ import re
import platform
import time
import fnmatch
+import sys
from os import environ
from sos.utilities import ImporterHelper, \
diff --git a/sos/utilities.py b/sos/utilities.py
index 64d0ce62..fcc78c54 100644
--- a/sos/utilities.py
+++ b/sos/utilities.py
@@ -35,10 +35,6 @@ import tarfile
import hashlib
import logging
import fnmatch
-try:
- import selinux
-except ImportError:
- pass
from contextlib import closing
try: