def fixTimeout(second):
 if isinstance(second, float):
  second = int(ceil(second))
 assert isinstance(second, (int, long))
 return max(second, 1)

def fixTimeout ( second ) : if isinstance ( second , float ) : second = int ( ceil ( second ) ) assert isinstance ( second , ( int , long ) ) return max ( second , 1 )
fix timeout value: convert to integer with a minimum of 1 second .