Mercurial > repos > melissacline > ucsc_xena_platform
changeset 3:98b498545a52
Fixed xena_delete to delete the files from the Xena files directory as well as from the database
author | melissacline |
---|---|
date | Wed, 14 Jan 2015 16:35:12 -0800 |
parents | 6eeb3ca663fb |
children | 1707e82d55bc c5b71ce5f7b1 8c7cb04577bd 8ac29f84644b 4a3c0e53d176 |
files | xena_delete.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)