@@ -429,7 +429,7 @@ def update(self, progress_callback=None):
429429 progress_callback (0 , "Reading remote ISF list" )
430430 cursor = self ._database .cursor ()
431431 cursor .execute (
432- f"SELECT cached FROM cache WHERE local = 0 and cached < datetime('now', { self .cache_period } )"
432+ f"SELECT cached FROM cache WHERE local = 0 and cached < datetime('now', ' { self .cache_period } ' )"
433433 )
434434 remote_identifiers = RemoteIdentifierFormat (constants .REMOTE_ISF_URL )
435435 progress_callback (50 , "Reading remote ISF list" )
@@ -438,9 +438,13 @@ def update(self, progress_callback=None):
438438 {}, operating_system = operating_system
439439 )
440440 for identifier , location in identifiers :
441+ identifier = identifier .rstrip ()
442+ identifier = (
443+ identifier [:- 1 ] if identifier .endswith (b"\x00 " ) else identifier
444+ ) # Linux banners dumped by dwarf2json end with "\x00\n". If not stripped, the banner cannot match.
441445 cursor .execute (
442446 "INSERT OR REPLACE INTO cache(identifier, location, operating_system, local, cached) VALUES (?, ?, ?, ?, datetime('now'))" ,
443- (location , identifier , operating_system , False ),
447+ (identifier , location , operating_system , False ),
444448 )
445449 progress_callback (100 , "Reading remote ISF list" )
446450 self ._database .commit ()
0 commit comments