fix: ZFSPath.from_string
This commit is contained in:
1 parent
68b432bba8
commit
73465ebab3
1 file changed
+4
-2
+4
-2
@@ -88,8 +88,10 @@ class ZFSPath:
|
||||
|
||||
@classmethod
|
||||
def from_string(cls, string: str) -> ZFSPath:
|
||||
path, snapname = string.split("@")
|
||||
elements: list[str] = path.split("/")
|
||||
snapname = None
|
||||
if "@" in string:
|
||||
string, snapname = string.split("@")
|
||||
elements: list[str] = string.split("/")
|
||||
return ZFSPath(elements, snapname)
|
||||
|
||||
@property
|
||||
|
||||
Reference in new issue
Block a user