trigger example
This commit is contained in:
parent
331d01dab1
commit
75c83067d6
1 changed files with 19 additions and 0 deletions
19
data/triggers-available/echo.py
Executable file
19
data/triggers-available/echo.py
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python
|
||||
"""echo.py - Simply echo the environment and the stdin."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
|
||||
def main():
|
||||
print 'STDIN JSON:', json.loads(sys.stdin.read())
|
||||
print ''
|
||||
print 'ENV:', os.environ
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
main()
|
||||
except Exception, e:
|
||||
print 'echo.py error: %s' % e
|
||||
pass
|
Loading…
Reference in a new issue