Skip to content

Commit 3ccc956

Browse files
committed
Explicitly raise TypeError
1 parent 9e5d66b commit 3ccc956

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydub/audio_segment.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ def __radd__(self, rarg):
268268
"""
269269
if rarg == 0:
270270
return self
271-
else:
272-
return self.__add__(rarg)
271+
raise TypeError("Gains must be the second addend after the "
272+
"AudioSegment")
273273

274274
def __sub__(self, arg):
275275
if isinstance(arg, AudioSegment):

0 commit comments

Comments
 (0)