powertop2tuned: fixed import exception with python2
Related to python3 conversion. Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
f563c7d756
commit
d8ddccb20d
1 changed files with 6 additions and 1 deletions
|
|
@ -20,7 +20,11 @@
|
|||
#
|
||||
|
||||
from __future__ import print_function
|
||||
from builtins import chr
|
||||
# exception handler for python 2/3 compatibility
|
||||
try:
|
||||
from builtins import chr
|
||||
except ImportError:
|
||||
pass
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
|
@ -28,6 +32,7 @@ import shutil
|
|||
import argparse
|
||||
import codecs
|
||||
from subprocess import *
|
||||
# exception handler for python 2/3 compatibility
|
||||
try:
|
||||
from html.parser import HTMLParser
|
||||
from html.entities import name2codepoint
|
||||
|
|
|
|||
Loading…
Reference in a new issue