Xenial updates for autoimage and certclient

This commit is contained in:
Ian Gulliver
2016-08-09 05:04:44 +00:00
parent 5defa222d6
commit d94c305fa8
3 changed files with 109 additions and 120 deletions

View File

@@ -1,43 +0,0 @@
#!/usr/bin/python3
import argparse
import sys
import time
parser = argparse.ArgumentParser(description='iconograph wait_for_service')
parser.add_argument(
'--type',
dest='type',
action='store',
choices={'happy', 'angry'},
required=True)
FLAGS = parser.parse_args()
def Happy():
yield '\a'
time.sleep(3.0)
def Angry():
yield '\a'
time.sleep(0.2)
_TYPES = {
'happy': Happy,
'angry': Angry,
}
def main():
handler = _TYPES[FLAGS.type]
while True:
for item in handler():
sys.stdout.write(item)
sys.stdout.flush()
if __name__ == '__main__':
main()