Bug #51369
closed
vstart_runner: use FileNotFoundError instead of OSError
Added by Rishabh Dave almost 3 years ago.
Updated 3 months ago.
Description
Found a py3 compatibility-related TODO in vstart_runner.py
's clear_old_log()
-
from os import stat
try:
stat(logpath)
# would need an update when making this py3 compatible. Use FileNotFound
# instead.
except OSError:
return
else:
os.remove(logpath)
with open(logpath, 'w') as logfile:
logfile.write('')
init_log()
log.debug('logging in a fresh file now...')
I suppose it's best to backport this fix to avoid re-discovery of this bug?
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 42029
- Status changed from Fix Under Review to Pending Backport
- Assignee set to Rishabh Dave
- Target version set to v17.0.0
- Source set to Development
- Backport set to pacific
- Tracker changed from Bug to Cleanup
- Copied to Backport #51653: pacific: vstart_runner: use FileNotFoundError instead of OSError added
- Tags set to backport_processed
- Tracker changed from Cleanup to Bug
- Status changed from Pending Backport to Resolved
- % Done changed from 0 to 100
- Regression set to No
- Severity set to 3 - minor
Also available in: Atom
PDF