Commit 2bb842cb authored by Rayan  CHIKHI's avatar Rayan CHIKHI
Browse files

making it delete the original file for good

parent a7fbfaa9
......@@ -71,18 +71,19 @@ def main():
region = os.environ.get("Region")
try:
if inputBucket == "" or fileName == "":
parser = argparse.ArgumentParser()
parser.add_argument("--bucketName", "-b", type=str, required=True)
parser.add_argument("--fileName", "-f", type=str, required=True)
parser.add_argument("--region", "-r", type=str, required=True)
parser.add_argument("--delete-original", "-d", dest='delete_original', action='store_true')
args = parser.parse_args()
parser = argparse.ArgumentParser()
parser.add_argument("--bucketName", "-b", type=str, required=True)
parser.add_argument("--fileName", "-f", type=str, required=True)
parser.add_argument("--region", "-r", type=str, required=True)
parser.add_argument("--delete-original", "-d", dest='delete_original', action='store_true')
args = parser.parse_args()
if inputBucket == "" or fileName == "":
inputBucket = args.bucketName
fileName = args.fileName
region = args.region
delete_original = args.delete_original
delete_original = args.delete_original
except Exception as ex:
logMessage(fileName, "Unexpected error during arg parsing (due to lack of environment variables):" + str(ex), LOGTYPE_ERROR)
......
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