We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8268cab commit 26315b0Copy full SHA for 26315b0
1 file changed
ceph_devstack/resources/ceph/containers.py
@@ -280,7 +280,7 @@ async def create_loop_device(self, device: str):
280
await self.cmd(["sudo", "modprobe", "loop"])
281
loop_img_name = os.path.join(self.loop_img_dir, self.device_image(device))
282
await self.remove_loop_device(device)
283
- device_pos = device.lstrip("/dev/loop")
+ device_pos = device.removeprefix("/dev/loop")
284
await self.cmd(
285
[
286
"sudo",
@@ -326,7 +326,7 @@ def device_name(self, index: int):
326
return f"/dev/loop{self.loop_device_count * self.index + index}"
327
328
def device_image(self, device: str):
329
- return f"{self.name}-{device.lstrip('/dev/loop')}"
+ return f"{self.name}-{device.removeprefix('/dev/loop')}"
330
331
332
class Teuthology(Container):
0 commit comments