Skip to content

Commit 3886c70

Browse files
committed
Fix UP024 (Replace aliased errors with OSError)
ruff check --select=UP024 --fix
1 parent 3e34660 commit 3886c70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subprojects/robotpy-cscore/cscore/imagewriter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def location(self):
104104
if self._location is None:
105105
# This assures that we only log when a USB memory stick is plugged in
106106
if not os.path.exists(self.location_root):
107-
raise IOError(
107+
raise OSError(
108108
"Logging disabled, %s does not exist" % self.location_root
109109
)
110110

@@ -139,7 +139,7 @@ def _run(self):
139139

140140
last = now
141141

142-
except IOError as e:
142+
except OSError as e:
143143
logger.error("Error logging images: %s", e)
144144

145145
logger.warn("Storage thread exited")

0 commit comments

Comments
 (0)