diff --git a/sox/core.py b/sox/core.py index bec2d41..f992de4 100644 --- a/sox/core.py +++ b/sox/core.py @@ -85,11 +85,13 @@ def _get_valid_formats(): if NO_SOX: return [] - shell_output = subprocess.check_output( - 'sox -h | grep "AUDIO FILE FORMATS"', - shell=True - ) - formats = str(shell_output).strip('\n').split(' ')[3:] + so = subprocess.check_output('sox -h', shell=True) + if type(so) is not str: + so = str(so, encoding='UTF-8') + so = so.split('\n') + idx = [i for i in range(len(so)) if 'AUDIO FILE FORMATS:' in so[i]][0] + formats = so[idx].split(' ')[3:] + return formats diff --git a/sox/version.py b/sox/version.py index 5c43133..eb3ce74 100644 --- a/sox/version.py +++ b/sox/version.py @@ -3,4 +3,4 @@ """Version info""" short_version = '1.3' -version = '1.3.2' +version = '1.3.3'