Wrap main routine in if __name__ == '__main__'

This commit is contained in:
Ryan Tucker 2011-09-20 16:55:23 -04:00
parent 45360b0b1a
commit c4cb3c8a7f

View file

@ -236,6 +236,7 @@ def send_file(bucket, filename, cmd, mesg):
return k
if __name__ == '__main__':
# Read in arguments
if len(sys.argv) != 12:
sys.stderr.write("Usage: %s tarCreatePath splitPath parPath host bkupNum \
@ -374,5 +375,3 @@ key = MyKey(bucket)
key.key = '%sCOMPLETE' % os.path.basename(filehead)
key.set_contents_from_string('%s %s "%s"' % (beginning, time.time(), mesg))
key.close()