diff options
| author | Mason Reed <mason@vector35.com> | 2025-11-03 20:12:58 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-11-04 13:34:46 -0500 |
| commit | dcfe8c5416e3245c986b5dd4326e77ba53145159 (patch) | |
| tree | 367d9400f76900c45969754dd338da7fd95c51e0 /plugins/warp/api | |
| parent | 427745da6d4bed73394995a3c768efcd10a78062 (diff) | |
[WARP] Update python example to fix adding a source to a "read-only" container
Diffstat (limited to 'plugins/warp/api')
| -rw-r--r-- | plugins/warp/api/python/warp.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/warp/api/python/warp.py b/plugins/warp/api/python/warp.py index 866d179b..fc487a4d 100644 --- a/plugins/warp/api/python/warp.py +++ b/plugins/warp/api/python/warp.py @@ -350,6 +350,13 @@ class WarpContainer(metaclass=_WarpContainerMetaclass): warpcore.BNWARPFreeContainerList(containers, count.value) return result + @staticmethod + def by_name(name: str) -> Optional['WarpContainer']: + for container in WarpContainer: + if container.name == name: + return container + return None + @property def name(self) -> str: return warpcore.BNWARPContainerGetName(self.handle) |
