Commit 8a702ac7 authored by kpetersn's avatar kpetersn
Browse files

Allow more than 4 args to be passed. Added test script.

parent a211965d
......@@ -45,8 +45,14 @@ def main(args):
# Alive XML page
alive_xml_url = "http://bcda.xray.aps.anl.gov/cgi-bin/alivexml.cgi"
# Parse args
name, ip, state, mess = args
### Parse args
# The following line only works if the number of args is exactly four
#!name, ip, state, mess = args
# The following lines allow Dohn to add arguments without breaking the script
name = args[0]
ip = args[1]
state = args[2]
mess = args[3]
# Get the XLM file
try:
......@@ -96,7 +102,7 @@ def main(args):
if __name__ == '__main__':
if len(sys.argv) != 5:
if len(sys.argv) < 5:
print "Usage: an_hook.py <iocname> <ip> <status> <user_args>"
#!print sys.argv
else:
......
#!/bin/bash
echo "I was called:" >> /home/beams/KPETERSN/notifiy-log.txt
echo " $*" >> /home/beams/KPETERSN/notifiy-log.txt
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment