File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1379,8 +1379,7 @@ class Idler:
13791379 def __init__ (self , imap , duration = None ):
13801380 if 'IDLE' not in imap .capabilities :
13811381 raise imap .error ("Server does not support IMAP4 IDLE" )
1382- if (duration is not None and
1383- not isinstance (imap .sock , socket .socket )):
1382+ if duration is not None and not imap .sock :
13841383 # IMAP4_stream pipes don't support timeouts
13851384 raise imap .error ('duration requires a socket connection' )
13861385 self ._duration = duration
@@ -1562,7 +1561,7 @@ def burst(self, interval=0.1):
15621561
15631562 Note: This generator requires a socket connection (not IMAP4_stream).
15641563 """
1565- if not isinstance ( self ._imap .sock , socket . socket ) :
1564+ if not self ._imap .sock :
15661565 raise self ._imap .error ('burst() requires a socket connection' )
15671566
15681567 try :
You can’t perform that action at this time.
0 commit comments