Skip to content

Commit 18800da

Browse files
Add type check when creating a new MerginProject
1 parent b912616 commit 18800da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mergin/merginproject.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class MerginProject:
4242
"""
4343

4444
def __init__(self, directory):
45+
if not isinstance(directory, str):
46+
raise ClientError("'directory' must be a str")
4547
self.dir = os.path.abspath(directory)
4648
if not os.path.exists(self.dir):
4749
raise InvalidProject("Project directory does not exist")

0 commit comments

Comments
 (0)