old_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  # rotate_servo_listener.py
  # author: Kentaro Wada <www.kentaro.wada@gmail.com>
  import rospy
  from std_msgs.msg import Bool
  
  from blink_led import BlinkLed
  
  PIN_CTRL = 13
  
  
  def callback(msg):
      bl = BlinkLed(PIN_CTRL)
      if msg.data is True:
          bl.on()
      else:
          bl.off()
      bl.cleanup()
  
  
  def listener():
      rospy.init_node('blink_led_listener')
      rospy.Subscriber('/jishu_pro/blink_led', Bool, callback)
      rospy.spin()
  
  
  if __name__ == '__main__':
      listener()
  
new_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  # rotate_servo_listener.py
  # author: Kentaro Wada <www.kentaro.wada@gmail.com>
  import rospy
  from std_msgs.msg import Bool
  
  from blink_led import BlinkLed
  
  PIN_CTRL = 13
  
  
  bl = BlinkLed(PIN_CTRL)
  def callback(msg):
      if msg.data is True:
          bl.on()
      else:
          bl.off()
  
  
  def listener():
      rospy.init_node('blink_led_listener')
      rospy.Subscriber('/jishu_pro/blink_led', Bool, callback)
      rospy.spin()
  
  
  if __name__ == '__main__':
      listener()
  
subject: update blink_led not to cleanup after the subscribing