Skip to content

Commit

Permalink
Merge pull request #46 from shaljam/master
Browse files Browse the repository at this point in the history
fix wrong variable name: _encoding to _smsEncoding
  • Loading branch information
babca authored Jun 6, 2017
2 parents 6e69c26 + 1973c95 commit c170f1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gsmmodem/modem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c170f1b

Please sign in to comment.