Skip to content

Commit

Permalink
specified error and removed nested directory creation
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyminium committed Mar 3, 2020
1 parent 1a40247 commit 2691809
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/hole2/hole.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ def over_order_parameters(self, order_parameters, frames=None):
order_parameters = np.loadtxt(order_parameters)
except IOError:
raise ValueError('Data file not found: {}'.format(order_parameters))
except:
except (ValueError, TypeError):
msg = ('Could not parse given file: {}. '
'`order_parameters` must be array-like '
'or a filename with array data '
Expand Down
6 changes: 3 additions & 3 deletions testsuite/MDAnalysisTests/analysis/test_hole2.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def test_relative(self):
assert fixed == self.filename

def test_symlink_dir(self, tmpdir):
nested = '/'.join(['really_'*10 +'long']*5)
dirname = 'really_'*20 +'long_name'
short_name = self.filename[-20:]
path = os.path.join(nested, short_name)
path = os.path.join(dirname, short_name)
with tmpdir.as_cwd():
os.makedirs(nested)
os.makedirs(dirname)
u = mda.Universe(PDB_HOLE)
u.atoms.write(path)

Expand Down

0 comments on commit 2691809

Please sign in to comment.