if self.Time.time() < datetime.time(10, 1,0):

     return

the code above return error as "descriptor 'time' for 'datetime.datetime' objects doesn't apply to a 'int' object
  at OnData"

I don't know why is this. Any help would be appreciated.