Wrap main routine in if __name__ == '__main__'
This commit is contained in:
parent
45360b0b1a
commit
c4cb3c8a7f
1 changed files with 111 additions and 112 deletions
|
@ -236,6 +236,7 @@ def send_file(bucket, filename, cmd, mesg):
|
||||||
|
|
||||||
return k
|
return k
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
# Read in arguments
|
# Read in arguments
|
||||||
if len(sys.argv) != 12:
|
if len(sys.argv) != 12:
|
||||||
sys.stderr.write("Usage: %s tarCreatePath splitPath parPath host bkupNum \
|
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.key = '%sCOMPLETE' % os.path.basename(filehead)
|
||||||
key.set_contents_from_string('%s %s "%s"' % (beginning, time.time(), mesg))
|
key.set_contents_from_string('%s %s "%s"' % (beginning, time.time(), mesg))
|
||||||
key.close()
|
key.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue