From e257ae57eaf0e509f5a37baf3d8cad0cacbfcae9 Mon Sep 17 00:00:00 2001
From: Anil Berry <5095826+aberrya@users.noreply.github.com>
Date: Wed, 17 Jan 2018 02:48:37 +0530
Subject: [PATCH] Fix Failing Log Namespaces filter

Choosing Log Namespace filter it was thowing up error
AttributeError: 'NoneType' object has no attribute 'startswith'.
Added check for None type for name
---
 cutelog/logger_tab.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cutelog/logger_tab.py b/cutelog/logger_tab.py
index e97a4ba..ac28b38 100644
--- a/cutelog/logger_tab.py
+++ b/cutelog/logger_tab.py
@@ -308,7 +308,10 @@ class RecordFilter(QSortFilterProxyModel):
                         result = True
                     if path:
                         name = record.name
-                        if name == path:
+                        # name is None for record added by method add_conn_closed_record(). 
+                        if name is None:
+                            result = False
+                        elif name == path:
                             result = True
                         elif not self.selection_includes_children and name == path:
                             result = True
-- 
GitLab