fixed danlging version_info
This commit is contained in:
parent
73aa4c930d
commit
3a25aca272
1 changed files with 8 additions and 0 deletions
|
@ -161,6 +161,7 @@ EXAMPLES = '''
|
|||
import binascii
|
||||
import datetime
|
||||
import math
|
||||
import os
|
||||
import re
|
||||
import select
|
||||
import socket
|
||||
|
@ -177,6 +178,13 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
#fix for python <2.4 compatibility
|
||||
if sys.version_info[0] < 3 and sys.version_info[1] < 5:
|
||||
def any(iterable):
|
||||
for element in iterable:
|
||||
if element:
|
||||
return True
|
||||
return False
|
||||
|
||||
class TCPConnectionInfo(object):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue