Skip to content

Commit 169715e

Browse files
authored
Fixed wrong variable being used in create_session validation error message (#118)
1 parent 38e5c22 commit 169715e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opentok/opentok.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ def create_session(self, location=None, media_mode=MediaModes.relayed, archive_m
248248
# build options
249249
options = {}
250250
if not isinstance(media_mode, MediaModes):
251-
raise OpenTokException(u('Cannot create session, {0} is not a valid media mode').format(role))
251+
raise OpenTokException(u('Cannot create session, {0} is not a valid media mode').format(media_mode))
252252
if not isinstance(archive_mode, ArchiveModes):
253-
raise OpenTokException(u('Cannot create session, {0} is not a valid archive mode').format(role))
253+
raise OpenTokException(u('Cannot create session, {0} is not a valid archive mode').format(archive_mode))
254254
if archive_mode == ArchiveModes.always and media_mode != MediaModes.routed:
255255
raise OpenTokException(u('A session with always archive mode must also have the routed media mode.'))
256256
options[u('p2p.preference')] = media_mode.value

0 commit comments

Comments
 (0)