Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
Adding topology if else cases
  • Loading branch information
talagayev authored Aug 6, 2024
1 parent b8a18cc commit 2545194
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions package/MDAnalysis/topology/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ class TopologyReaderBase(IOBase, metaclass=_Topologymeta):
"""
def __init__(self, filename):

self.filename = filename

if isinstance(filename, util.NamedStream):
self.filename = filename
else:
self.filename = str(filename)

def parse(self, **kwargs): # pragma: no cover
raise NotImplementedError("Override this in each subclass")
Expand Down

0 comments on commit 2545194

Please sign in to comment.