Skip to content

Commit

Permalink
python2 fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
WOnder93 committed Oct 18, 2019
1 parent a33acec commit b39a121
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion python/sepolicy/sepolicy.py
Expand Up @@ -25,9 +25,19 @@
import sys
import selinux
import sepolicy
from multiprocessing import Pool
from sepolicy import get_os_version, get_conditionals, get_conditionals_format_text
import argparse
if sys.version_info[0] >= 3:
from multiprocessing import Pool
else:
# multiprocessing.Pool behaves badly in Python 2, fallback to sequential execution
class Pool(object):
def apply_async(self, f, args):
f(*args)
def close(self):
pass
def join(self):
pass
PROGNAME = "policycoreutils"
try:
import gettext
Expand Down

0 comments on commit b39a121

Please sign in to comment.