jet-admin / jet-bridge

if statement can be simplified PYL-R1703
Anti-pattern
Major
6 months ago3 years old
The if statement can be replaced with 'return bool(test)'
118        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
119
120        try:
121            if s.connect_ex(connect_to) == 0:122                return True
123            else:
124                return False