diff --git a/bilby/core/result.py b/bilby/core/result.py index fc709c512f1c0f18a61244363153929616bbbe14..f81558c2ac339c69a9864900cfbb82541a77ddd1 100644 --- a/bilby/core/result.py +++ b/bilby/core/result.py @@ -43,6 +43,8 @@ def result_file_name(outdir, label, extension='json', gzip=False): ======= str: File name of the output file """ + if extension == 'pickle': + extension = 'pkl' if extension in ['json', 'hdf5', 'pkl']: if extension == 'json' and gzip: return os.path.join(outdir, '{}_result.{}.gz'.format(label, extension)) @@ -735,7 +737,7 @@ class Result(object): default=False outdir: str, optional Path to the outdir. Default is the one stored in the result object. - extension: str, optional {json, hdf5, pickle, True} + extension: str, optional {json, hdf5, pkl, pickle, True} Determines the method to use to store the data (if True defaults to json) gzip: bool, optional