# common.py is imported by all modules, so do not import third-party
# libraries here as they will become a requirement for all commands.
+import io
import os
import sys
import re
config = {}
logging.debug("Reading %s" % config_file)
- execfile(config_file, config)
+ with io.open(config_file, "rb") as f:
+ code = compile(f.read(), config_file, 'exec')
+ exec(code, None, config)
# smartcardoptions must be a list since its command line args for Popen
if 'smartcardoptions' in config: