Fix selinux import error handling.
authorZac Medico <zmedico@gentoo.org>
Sat, 29 Jan 2011 08:02:34 +0000 (00:02 -0800)
committerZac Medico <zmedico@gentoo.org>
Wed, 2 Feb 2011 23:17:58 +0000 (15:17 -0800)
pym/portage/__init__.py

index 374d077f14c8385415ce9fef750bce5e9733c516..9732a74b186edc80fdb7b8747e877d6c354c694d 100644 (file)
@@ -309,6 +309,7 @@ shutil = _unicode_module_wrapper(_shutil, encoding=_encodings['fs'])
 
 # Imports below this point rely on the above unicode wrapper definitions.
 try:
+       __import__('selinux')
        import portage._selinux
        selinux = _unicode_module_wrapper(_selinux,
                encoding=_encodings['fs'])