changeset 328:429125596c68 trim

handle empty uri
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Tue, 27 Jan 2026 13:29:50 +0000
parents cb3b9cd1a7ad
children d060e49285e2
files lib/python/cc/lmh/miss_bogons.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib/python/cc/lmh/miss_bogons.py	Sat Jan 24 12:01:43 2026 +0000
+++ b/lib/python/cc/lmh/miss_bogons.py	Tue Jan 27 13:29:50 2026 +0000
@@ -26,14 +26,14 @@
     else:
       print("bad cdb |%s|"%cdb,file=sys.stderr)
       exit(2)
-    #print(cdb,"|%s|%s|%s|"%(cdb_date,cdb_host,cdb_uri),file=sys.stderr)
-    clean_cdb_uri = '/' if cdb_uri == '' else \
-                    cdbUriPat.sub('\\1\\2', cdb_uri).lower()
+    print(cdb,"|%s|%s|%s|"%(cdb_date,cdb_host,cdb_uri))
+    clean_cdb_uri = ('/' if cdb_uri == '' else 
+                     cdbUriPat.sub('\\1\\2', cdb_uri).lower())
     if (m:=idxPat.match(idx)):
       idx_uri = m.group(2)
     else:
       print("bad idx |%s|"%idx, file=sys.stderr)
       exit(3)
     if clean_cdb_uri != idx_uri:
-      print("%s:\n %s\n %s"%(i, clean_cdb_uri, idx_uri))
+      print("%s:\n %s|%s|\n %s|%s|"%(i, len(clean_cdb_uri), clean_cdb_uri, len(idx_uri), idx_uri))
     i+=1