equal
deleted
inserted
replaced
130 |
130 |
131 if timestamp is not None: |
131 if timestamp is not None: |
132 parameters["senddate"] = unicode(timestamp) |
132 parameters["senddate"] = unicode(timestamp) |
133 |
133 |
134 parameters["concat_sms"] = "1" if len(message) > 160 else "0" |
134 parameters["concat_sms"] = "1" if len(message) > 160 else "0" |
135 |
|
136 params = "&".join( ["%s=%s" % (urllib.quote(k),urllib.quote(v.encode("utf-8"))) for (k, v) in parameters.items()]) |
135 params = "&".join( ["%s=%s" % (urllib.quote(k),urllib.quote(v.encode("utf-8"))) for (k, v) in parameters.items()]) |
137 headers = {"Content-type": "application/x-www-form-urlencoded", |
136 headers = {"Content-type": "application/x-www-form-urlencoded", |
138 "Accept": "text/plain"} |
137 "Accept": "text/plain"} |
139 conn = httplib.HTTPConnection("%s:%i" % (self.gateway, self.gatewayPort)) |
138 conn = httplib.HTTPConnection("%s:%i" % (self.gateway, self.gatewayPort)) |
140 try: |
139 try: |