Skip to content

Commit fcbb1a2

Browse files
committed
update innit to accept root_path
1 parent 0d08dbe commit fcbb1a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/diffpy/cmi/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def get_package_dir(root_path=None):
3131
context manager
3232
A context manager that yields a pathlib.Path to the package directory.
3333
"""
34-
resource = files(__name__)
34+
if root_path is None:
35+
resource = files(__name__)
36+
else:
37+
resource = root_path
3538
return as_file(resource)
3639

3740

0 commit comments

Comments
 (0)