Project

General

Profile

Cleanup #19345

misc.py could use some cleanups

Added by Dan Mick about 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:

Description

Noticed while reviewing https://github.com/ceph/teuthology/pull/1049:

1) arg to stat is passed as

'\"%a\"',

None of that quoting is necessary except the outer ''

Removing it also removes the need for the dance around strip/rstrip at

proc.stdout.getvalue().rstrip().strip('\"')

2) move_file sets up stdout=StringIO() but then doesn't consume it at all

Also available in: Atom PDF