parameters: (self)
docstring: Restart if daemonized, else exit.
docstring_summary: Restart if daemonized, else exit.
docstring_tokens: Restart if daemonized else exit .
function: def handle_SIGHUP(self):
          """Restart if daemonized, else exit."""
          if self._is_daemonized():
              self.bus.log('SIGHUP caught while daemonized. Restarting.')
              self.bus.restart()
          else:
              # not daemonized (may be foreground or background)
              self.bus.log('SIGHUP caught but not daemonized. Exiting.')
              self.bus.exit()
function_tokens: def handle_SIGHUP ( self ) : if self . _is_daemonized ( ) : self . bus . log ( 'SIGHUP caught while daemonized. Restarting.' ) self . bus . restart ( ) else : # not daemonized (may be foreground or background) self . bus . log ( 'SIGHUP caught but not daemonized. Exiting.' ) self . bus . exit ( )