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
|
@classmethod
|
||||||
def from_string(cls, string: str) -> ZFSPath:
|
def from_string(cls, string: str) -> ZFSPath:
|
||||||
path, snapname = string.split("@")
|
snapname = None
|
||||||
elements: list[str] = path.split("/")
|
if "@" in string:
|
||||||
|
string, snapname = string.split("@")
|
||||||
|
elements: list[str] = string.split("/")
|
||||||
return ZFSPath(elements, snapname)
|
return ZFSPath(elements, snapname)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in new issue
Block a user