if drive not in issue
This commit is contained in:
@ -438,10 +438,6 @@ class SystemHealthMonitor:
|
|||||||
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
priority = "⚠ HIGH" if "CRITICAL" in issue else "● MEDIUM"
|
priority = "⚠ HIGH" if "CRITICAL" in issue else "● MEDIUM"
|
||||||
|
|
||||||
# Add debug statements to track the issue
|
|
||||||
logger.debug(f"Generating description for issue: {issue}")
|
|
||||||
logger.debug(f"Issue type: {type(issue)}")
|
|
||||||
|
|
||||||
content_width = self.STANDARD_WIDTH - 2
|
content_width = self.STANDARD_WIDTH - 2
|
||||||
banner = f"""
|
banner = f"""
|
||||||
┏{'━' * content_width}┓
|
┏{'━' * content_width}┓
|
||||||
@ -472,7 +468,7 @@ class SystemHealthMonitor:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if "Drive" in issue:
|
if "Drive" in issue:
|
||||||
device = re.search(r'/dev/[a-zA-Z0-9]+', issue).group(0)
|
device = re.search(r'/dev/[a-zA-Z0-9]+', issue).group(0) if '/dev/' in issue else None
|
||||||
drive_info = next((d for d in health_report['drives_health']['drives'] if d['device'] == device), None)
|
drive_info = next((d for d in health_report['drives_health']['drives'] if d['device'] == device), None)
|
||||||
drive_details = self._get_drive_details(device)
|
drive_details = self._get_drive_details(device)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user