diff --git a/avocado/utils/partition.py b/avocado/utils/partition.py index de25afdfbbdc6097459154309cd056d69d42b258..b8d1d60fe526d188a5f738ce1980d47ac62b1d3a 100644 --- a/avocado/utils/partition.py +++ b/avocado/utils/partition.py @@ -254,10 +254,6 @@ class Partition(object): cmd = "lsof " + mnt out = process.system_output(cmd) return [int(line.split()[1]) for line in out.splitlines()[1:]] - except FileNotFoundError as details: - msg = 'Could not find lsof executable' - LOG.error(msg) - raise PartitionError(self, msg, details) except OSError as details: msg = 'Could not run lsof to identify processes using "%s"' % mnt LOG.error(msg) diff --git a/optional_plugins/html/avocado_result_html/__init__.py b/optional_plugins/html/avocado_result_html/__init__.py index fbffdb3a2df8ce8ab9200c7d672547b32afe8548..e7e5b9ceae462c8705fdb3c9065565f8cb57020a 100644 --- a/optional_plugins/html/avocado_result_html/__init__.py +++ b/optional_plugins/html/avocado_result_html/__init__.py @@ -98,10 +98,8 @@ class ReportModel(object): try: with open(sysinfo_path, 'r') as sysinfo_file: sysinfo_contents = sysinfo_file.read() - except OSError as details: + except (OSError, IOError) as details: sysinfo_contents = "Error reading %s: %s" % (sysinfo_path, details) - except IOError as details: - sysinfo_contents = os.uname()[1] return sysinfo_contents def hostname(self): diff --git a/selftests/checkall b/selftests/checkall index 859835bcf953eb2bf0a096fa9946e9304dd0ab54..0f58b4670f8d21ec0ddf98365e30577bb28cb6b7 100755 --- a/selftests/checkall +++ b/selftests/checkall @@ -169,7 +169,7 @@ results_dir_content() { [ "$SKIP_RESULTSDIR_CHECK" ] || RESULTS_DIR_CONTENT="$(ls $RESULTS_DIR 2> /dev/null)" LINT_CMD="inspekt lint --exclude=.git" -PYLINT_ENABLE="--enable R0401,W0101,W0102,W0104,W0105,W0106,W0107,W0108,W0109,W0111,W0120,W0122,W0123,W0124,W0125,W0150,W0199,W0211,W0222,W0223,W0232,W0233,W0301,W0312,W0401,W0404,W0406,W0410,W0601,W0602,W0603,W0604,W0611,W0612,W0613,W0614,W0621,W0622,W0623,W0640,W0711,W1201,W1202,W1300,W1301,W1302,W1303,W1304,W1305,W1306,W1307,W1401,W1402,W1501,W1503,W1645" +PYLINT_ENABLE="--enable R0401,W0101,W0102,W0104,W0105,W0106,W0107,W0108,W0109,W0111,W0120,W0122,W0123,W0124,W0125,W0150,W0199,W0211,W0222,W0223,W0232,W0233,W0301,W0312,W0401,W0404,W0406,W0410,W0601,W0602,W0603,W0604,W0611,W0612,W0613,W0614,W0621,W0622,W0623,W0640,W0705,W0711,W1201,W1202,W1300,W1301,W1302,W1303,W1304,W1305,W1306,W1307,W1401,W1402,W1501,W1503,W1645" if [ "$AVOCADO_PARALLEL_LINT" ]; then LINT_CMD="$LINT_CMD --parallel=$AVOCADO_PARALLEL_LINT" fi