Update for Python 3.8 pylint alerts

This commit is contained in:
2Shirt 2019-12-02 17:55:05 -07:00
parent 7796189d14
commit c520b5a865
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
3 changed files with 9 additions and 2 deletions

View file

@ -181,6 +181,7 @@ def popen_program(cmd, minimized=False, pipe=False, shell=False, **kwargs):
def run_program(cmd, check=True, pipe=True, shell=False, **kwargs):
# pylint: disable=subprocess-run-check
"""Run program and return a subprocess.CompletedProcess object."""
LOG.debug(
'cmd: %s, check: %s, pipe: %s, shell: %s',

View file

@ -497,6 +497,7 @@ def disk_attribute_check(state, test_objects):
"""Disk attribute check."""
LOG.info('Disk Attribute Check')
#TODO: at
LOG.debug('%s, %s', state, test_objects)
std.print_warning('TODO: at')
std.pause()
@ -505,6 +506,7 @@ def disk_io_benchmark(state, test_objects):
"""Disk I/O benchmark using dd."""
LOG.info('Disk I/O Benchmark (dd)')
#TODO: io
LOG.debug('%s, %s', state, test_objects)
std.print_warning('TODO: io')
std.pause()
@ -513,6 +515,7 @@ def disk_self_test(state, test_objects):
"""Disk self-test if available."""
LOG.info('Disk Self-Test')
#TODO: st
LOG.debug('%s, %s', state, test_objects)
std.print_warning('TODO: st')
std.pause()
@ -521,6 +524,7 @@ def disk_surface_scan(state, test_objects):
"""Disk surface scan using badblocks."""
LOG.info('Disk Surface Scan (badblocks)')
#TODO: bb
LOG.debug('%s, %s', state, test_objects)
std.print_warning('TODO: bb')
std.pause()

View file

@ -9,12 +9,16 @@ import os
import pathlib
import platform
import re
import socket
import subprocess
import sys
import time
import traceback
from collections import OrderedDict
import requests
try:
from termios import tcflush, TCIOFLUSH
except ImportError:
@ -716,7 +720,6 @@ def color_string(strings, colors, sep=' '):
def generate_debug_report():
"""Generate debug report, returns str."""
import socket
platform_function_list = (
'architecture',
'machine',
@ -971,7 +974,6 @@ def strip_colors(string):
def upload_debug_report(report, compress=True, reason='DEBUG'):
"""Upload debug report to CRASH_SERVER as specified in wk.cfg.main."""
LOG.info('Uploading debug report to %s', CRASH_SERVER.get('Name', '?'))
import requests
headers = CRASH_SERVER.get('Headers', {'X-Requested-With': 'XMLHttpRequest'})
if compress:
headers['Content-Type'] = 'application/octet-stream'