def change_status(): """ """ print('Changing status of NoTrack') blockparser = BlockParser(config.dns_blockip) if config.status & STATUS_ENABLED: blockparser.enable_blockling() else: blockparser.disable_blocking()
def check_pause(current_time): """ Check if pause time has been reached Function should only be called if status is STATUS_PAUSED Parameters: current_time (int): The current epoch time value """ if config.unpausetime < current_time: print('Unpause time reached') blockparser = BlockParser(config.dns_blockip) blockparser.enable_blockling() config.status -= STATUS_PAUSED config.status += STATUS_ENABLED config.unpausetime = 0