Last active
January 28, 2019 22:42
-
-
Save mattdodge/289b1ae5f5ba0903d74d979b9dd20ab7 to your computer and use it in GitHub Desktop.
nio Block for setting status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nio.block.base import Block | |
from nio.command import command | |
@command('set_warning') | |
@command('set_error') | |
@command('set_ok') | |
class StatusBlock(Block): | |
def set_warning(self): | |
return {'status': self.set_status('warn')} | |
def set_ok(self): | |
return {'status': self.set_status('ok')} | |
def set_error(self): | |
return {'status': self.set_status('error')} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment