Skip to content

Commit

Permalink
Use os.sep for path separators
Browse files Browse the repository at this point in the history
Supports a fix for #117
  • Loading branch information
Aaron Snoswell committed Feb 20, 2019
1 parent 8b92b8a commit 667bb5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spinup/utils/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,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])

Expand Down

0 comments on commit 667bb5a

Please sign in to comment.