Skip to content

Commit 6f513bd

Browse files
committed
Remove try-except as unnecessary.
1 parent 33f2aee commit 6f513bd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Lib/multiprocessing/shared_memory.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,8 @@ def name(self):
202202
"Unique name that identifies the shared memory block."
203203
reported_name = self._name
204204
if _USE_POSIX and self._prepend_leading_slash:
205-
try:
206-
if self._name[0] == "/":
207-
reported_name = self._name[1:]
208-
except Exception:
209-
pass
205+
if self._name.startswith("/"):
206+
reported_name = self._name[1:]
210207
return reported_name
211208

212209
@property

0 commit comments

Comments
 (0)