Created
March 13, 2012 13:58
-
-
Save mkorpela/2028933 to your computer and use it in GitHub Desktop.
Monkey that somehow got out of his cage
This file contains 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 robot.libraries.BuiltIn import BuiltIn | |
def run_flat(name, *args): | |
""" | |
This keyword flattens robot logs. Only messages will be logged - no keyword structure. | |
""" | |
from robot.output import LOGGER | |
s, e = LOGGER.start_keyword, LOGGER.end_keyword | |
LOGGER.start_keyword = LOGGER.end_keyword = lambda *_:0 | |
try: | |
return BuiltIn().run_keyword(name, *args) | |
finally: | |
LOGGER.start_keyword, LOGGER.end_keyword = s, e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mkorpela Thanks for sharing, could you please let me know how to use this keyword?