Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Whitaker committed Aug 23, 2012
2 parents f19d562 + f8ea2bd commit 3265670
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apns.py
Expand Up @@ -31,7 +31,7 @@
try:
from ssl import wrap_socket
except ImportError:
from socket import ssl
from socket import ssl as wrap_socket

try:
import json
Expand Down Expand Up @@ -123,10 +123,7 @@ def _connect(self):
# Establish an SSL connection
self._socket = socket(AF_INET, SOCK_STREAM)
self._socket.connect((self.server, self.port))
if wrap_socket:
self._ssl = wrap_socket(self._socket, self.key_file, self.cert_file)
else:
self._ssl = ssl(self._socket, self.key_file, self.cert_file)
self._ssl = wrap_socket(self._socket, self.key_file, self.cert_file)

def _disconnect(self):
if self._socket:
Expand Down

0 comments on commit 3265670

Please sign in to comment.