output folder error solved

This commit is contained in:
Godwin Ani 2023-08-24 14:46:32 -04:00 committed by GitHub
parent 13af646e65
commit a60fb89a45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,9 +34,7 @@ args = parser.parse_args()
#Creating an output folder #Creating an output folder
if not os.path.isdir(args.output + '/GuidanceOutput'): if not os.path.isdir(args.output + '/GuidanceOutput'):
os.mkdir(args.output + '/GuidanceOutput') os.mkdir(args.output + '/GuidanceOutput')
elif args.force: elif not args.force:
os.system('rm -r ' + args.output + '/GuidanceOutput/*')
else:
print('\nERROR: An output folder already exists at the given path. Delete it or run in --force mode\n') print('\nERROR: An output folder already exists at the given path. Delete it or run in --force mode\n')
quit() quit()