Skip to content

Commit 09b1687

Browse files
committedNov 17, 2014
Fix script on Python 2.6, where there are no set literals.
1 parent 0acda1b commit 09b1687

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎speech_recognition/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ def samples_to_flac(self, source, frame_data):
121121
path = os.path.dirname(os.path.abspath(__file__)) # directory of the current module file, where all the FLAC bundled binaries are stored
122122
flac_converter = shutil_which("flac") # check for installed version first
123123
if flac_converter is None: # flac utility is not installed
124-
if system == "Windows" and platform.machine() in {"i386", "x86", "x86_64", "AMD64"}: # Windows NT, use the bundled FLAC conversion utility
124+
if system == "Windows" and platform.machine() in set("i386", "x86", "x86_64", "AMD64"): # Windows NT, use the bundled FLAC conversion utility
125125
flac_converter = os.path.join(path, "flac-win32.exe")
126-
elif system == "Linux" and platform.machine() in {"i386", "x86", "x86_64", "AMD64"}:
126+
elif system == "Linux" and platform.machine() in set("i386", "x86", "x86_64", "AMD64"):
127127
flac_converter = os.path.join(path, "flac-linux-i386")
128128
else:
129129
raise ChildProcessError("FLAC conversion utility not available - consider installing the FLAC command line application")

0 commit comments

Comments
 (0)