i have the below code
import can
def abcd():
bus = can.interface.Bus(channel= '1', bustype='vector',app_name = 'python-can')
MSG = bus.recv(0.5)
while MSG is not None:
MSG = bus.recv(1)
return MSG
if __name__ == '__main__':
abcd()
and i want to return MSG every time how can i do ? can some one help me?