Skip to content

Commit 2f045df

Browse files
author
Mikhail Knyazev
committed
2 parents 014ed00 + c170f1b commit 2f045df

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

gsmmodem/modem.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,13 +679,13 @@ def smsEncoding(self, encoding):
679679
self._commands = self.supportedCommands
680680

681681
if self._commands == None:
682-
if encoding != self._encoding:
682+
if encoding != self._smsEncoding:
683683
raise CommandError('Unable to set SMS encoding (no supported commands)')
684684
else:
685685
return
686686

687687
if not '+CSCS' in self._commands:
688-
if encoding != self._encoding:
688+
if encoding != self._smsEncoding:
689689
raise CommandError('Unable to set SMS encoding (+CSCS command not supported)')
690690
else:
691691
return
@@ -703,7 +703,7 @@ def smsEncoding(self, encoding):
703703
self._smsEncoding = encoding
704704
return
705705

706-
if encoding != self._encoding:
706+
if encoding != self._smsEncoding:
707707
raise ValueError('Unable to set SMS encoding (enocoding {0} not supported)'.format(encoding))
708708
else:
709709
return

0 commit comments

Comments
 (0)