sendmail = self.find_sendmail()
if not sendmail:
- raise ValueError, "cannot find sendmail binary"
+ raise ValueError("cannot find sendmail binary")
self.sendmail = sendmail
def find_sendmail(self):
reply_to=''): # send reply to this e-mail
Transport.__init__(self, phone, message)
if mode not in ('GSM', 'DAMPS'):
- raise ValueError, "mode (%s) must be either 'GSM' or 'DAMPS'" % mode
+ raise ValueError("mode (%s) must be either 'GSM' or 'DAMPS'" % mode)
self.mode = mode
self.transliterate = transliterate
self.reply_to = reply_to
elif prf == '7901':
dict['network_code'] = '1'
else:
- raise RuntimeError, "incorrect combination of mode (%s) and prefix (%s)" % (self.mode, prf)
+ raise RuntimeError("incorrect combination of mode (%s) and prefix (%s)" % (self.mode, prf))
dict['phone'] = self.phone[4:]
dict['message'] = text
prefix = phone[1:4]
if prefix in ("095", "901"): # 901 is being used by Beeline and SkyLink
- raise SMSError, "unknown provider for phone %s" % phone
+ raise SMSError("unknown provider for phone %s" % phone)
if Prefix2Provider.has_key(prefix):
return Prefix2Provider[prefix]
- raise SMSError, "bad prefix for phone %s" % phone
+ raise SMSError("bad prefix for phone %s" % phone)