# HG changeset patch # User melissacline # Date 1421282112 28800 # Node ID 98b498545a52279a9e82639ee457221669f4f36f # Parent 6eeb3ca663fbcd422420fc5f47dc8eba0d2ff095 Fixed xena_delete to delete the files from the Xena files directory as well as from the database diff -r 6eeb3ca663fb -r 98b498545a52 xena_delete.py --- a/xena_delete.py Wed Jan 14 15:21:09 2015 -0800 +++ b/xena_delete.py Wed Jan 14 16:35:12 2015 -0800 @@ -33,7 +33,6 @@ xenaFileDir, args.datasetName, xena.port()) - print "Issuing command", xenaDeleteCmd try: subprocess.call(xenaDeleteCmd, shell=True) except: @@ -45,6 +44,12 @@ sys.exit(-1) else: fp2.write( "Dataset %s deleted\n" % args.datasetName) + dataPathname = xenaFileDir + "/" + args.datasetName + if os.path.exists(dataPathname): + os.unlink(dataPathname) + metadataPathname = dataPathname + ".json" + if os.path.exists(metadataPathname): + os.unlink(metadataPathname) fp2.close() sys.exit(0)