diff --git a/gsmmodem/modem.py b/gsmmodem/modem.py index e468f34..f99e37b 100644 --- a/gsmmodem/modem.py +++ b/gsmmodem/modem.py @@ -378,7 +378,9 @@ def _unlockSim(self, pin): else: # Nothing read (real timeout) raise timeout - if cpinResponse != '+CPIN: READY': + #if cpinResponse != '+CPIN: READY': + #some modems reply w/o blanks in response + if cpinResponse.replace(' ', '') != '+CPIN:READY': if pin != None: self.write('AT+CPIN="{0}"'.format(pin)) else: