diff --git a/spinup/utils/plot.py b/spinup/utils/plot.py index a6b8f4e36..f06d78c41 100644 --- a/spinup/utils/plot.py +++ b/spinup/utils/plot.py @@ -109,12 +109,12 @@ def get_all_datasets(all_logdirs, legend=None, select=None, exclude=None): """ logdirs = [] for logdir in all_logdirs: - if osp.isdir(logdir) and logdir[-1]=='/': + if osp.isdir(logdir) and logdir[-1]==os.sep: logdirs += [logdir] else: basedir = osp.dirname(logdir) fulldir = lambda x : osp.join(basedir, x) - prefix = logdir.split('/')[-1] + prefix = logdir.split(os.sep)[-1] listdir= os.listdir(basedir) logdirs += sorted([fulldir(x) for x in listdir if prefix in x])