Skip to content

Commit 47bb42d

Browse files
committed
Fix import for Python 3.9+
1 parent 23779fd commit 47bb42d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: pydub/pyaudioop.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
from builtins import min as builtin_min
77
import math
88
import struct
9-
from fractions import gcd
9+
try:
10+
from fractions import gcd
11+
except ImportError: # Python 3.9+
12+
from math import gcd
1013
from ctypes import create_string_buffer
1114

1215

0 commit comments

Comments
 (0)