From 1973c95021f0aefa123b7779a45087267a932fbf Mon Sep 17 00:00:00 2001 From: Ali Momen Sani Date: Wed, 7 Jun 2017 02:24:53 +0430 Subject: [PATCH] change wrong attribute _encoding to _smsEncoding --- gsmmodem/modem.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gsmmodem/modem.py b/gsmmodem/modem.py index 7b37dbd..d075808 100644 --- a/gsmmodem/modem.py +++ b/gsmmodem/modem.py @@ -679,13 +679,13 @@ def smsEncoding(self, encoding): self._commands = self.supportedCommands if self._commands == None: - if encoding != self._encoding: + if encoding != self._smsEncoding: raise CommandError('Unable to set SMS encoding (no supported commands)') else: return if not '+CSCS' in self._commands: - if encoding != self._encoding: + if encoding != self._smsEncoding: raise CommandError('Unable to set SMS encoding (+CSCS command not supported)') else: return @@ -703,7 +703,7 @@ def smsEncoding(self, encoding): self._smsEncoding = encoding return - if encoding != self._encoding: + if encoding != self._smsEncoding: raise ValueError('Unable to set SMS encoding (enocoding {0} not supported)'.format(encoding)) else: return