Project

General

Profile

Cleanup #51369

vstart_runner: use FileNotFoundError instead of OSError

Added by Rishabh Dave 3 months ago. Updated 3 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Tags:
Backport:
pacific
Reviewed:
Affected Versions:
Pull request ID:

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...')

Related issues

Copied to Ceph - Backport #51653: pacific: vstart_runner: use FileNotFoundError instead of OSError New

History

#1 Updated by Rishabh Dave 3 months ago

I suppose it's best to backport this fix to avoid re-discovery of this bug?

#2 Updated by Rishabh Dave 3 months ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 42029

#3 Updated by Patrick Donnelly 3 months ago

  • 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

#4 Updated by Patrick Donnelly 3 months ago

  • Tracker changed from Bug to Cleanup

#5 Updated by Backport Bot 3 months ago

  • Copied to Backport #51653: pacific: vstart_runner: use FileNotFoundError instead of OSError added

Also available in: Atom PDF