X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Fnet%2Fsms.py;h=c3df7373518a28f2a2e314fb2fc683670bab4955;hb=e75d2c94f9bd326ebaace635a06599a1be35b024;hp=9b7339001f1801fc0340b4adc3f6c008a160830a;hpb=87ed070d1b1776366d3ddd15eef1f37a45c585ea;p=m_lib.git diff --git a/m_lib/net/sms.py b/m_lib/net/sms.py index 9b73390..c3df737 100644 --- a/m_lib/net/sms.py +++ b/m_lib/net/sms.py @@ -249,7 +249,7 @@ class SendmailTransport(EMailTransport): 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): @@ -359,7 +359,7 @@ class BeeOnLine(CP1251HTTPTransport): 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 @@ -382,7 +382,7 @@ class BeeOnLine(CP1251HTTPTransport): 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 @@ -561,9 +561,9 @@ def Phone2Provider(phone): 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)