@@ -81,7 +81,7 @@ def format_patches(self, lp_name, version):
81
81
82
82
# Filter only the branches related to this BSC
83
83
for branch in utils .get_lp_branches (lp_name , kgr_patches ):
84
- print (branch )
84
+ logging . info (branch )
85
85
bname = branch .replace (lp_name + "_" , "" )
86
86
bs = " " .join (bname .split ("_" ))
87
87
bsc = lp_name .replace ("bsc" , "bsc#" )
@@ -206,7 +206,7 @@ def get_commits(self, cve, savedir=None):
206
206
207
207
self .fetch_kernel_branches ()
208
208
209
- print ("Getting SUSE fixes for upstream commits per CVE branch. It can take some time..." )
209
+ logging . info ("Getting SUSE fixes for upstream commits per CVE branch. It can take some time..." )
210
210
211
211
# Store all commits from each branch and upstream
212
212
commits = {}
@@ -309,7 +309,7 @@ def get_commits(self, cve, savedir=None):
309
309
stderr = subprocess .STDOUT ,
310
310
).decode ("ISO-8859-1" )
311
311
except subprocess .CalledProcessError :
312
- print (
312
+ logging . warn (
313
313
f"File { fname } doesn't exists { mbranch } . It could "
314
314
" be removed, so the branch is not affected by the issue."
315
315
)
@@ -360,16 +360,16 @@ def get_commits(self, cve, savedir=None):
360
360
for d , c , msg in ucommits_sort :
361
361
commits ["upstream" ]["commits" ].append (f'{ c } ("{ msg } ")' )
362
362
363
- print ("" )
363
+ logging . info ("" )
364
364
365
365
for key , val in commits .items ():
366
- print (f"{ key } " )
366
+ logging . info (f"{ key } " )
367
367
branch_commits = val ["commits" ]
368
368
if not branch_commits :
369
- print ("None" )
369
+ logging . info ("None" )
370
370
for c in branch_commits :
371
- print (c )
372
- print ("" )
371
+ logging . info (c )
372
+ logging . info ("" )
373
373
374
374
return commits
375
375
@@ -451,7 +451,7 @@ def get_patched_kernels(self, codestreams, commits, cve):
451
451
logging .info ("No CVE informed, skipping the processing of getting the patched kernels." )
452
452
return []
453
453
454
- print ("Searching for already patched codestreams..." )
454
+ logging . info ("Searching for already patched codestreams..." )
455
455
456
456
kernels = []
457
457
@@ -475,17 +475,17 @@ def get_patched_kernels(self, codestreams, commits, cve):
475
475
if not patched and kernel not in suse_tags :
476
476
continue
477
477
478
- print (f"\n { cs .name ()} ({ kernel } ):" )
478
+ logging . debug (f"\n { cs .name ()} ({ kernel } ):" )
479
479
480
480
# If no patches/commits were found for this kernel, fallback to
481
481
# the commits in the main SLE branch. In either case, we can
482
482
# assume that this kernel is already patched.
483
483
for c in kern_commits if patched else suse_commits :
484
- print (f"{ c } " )
484
+ logging . debug (f"{ c } " )
485
485
486
486
kernels .append (kernel )
487
487
488
- print ("" )
488
+ logging . debug ("" )
489
489
490
490
# remove duplicates
491
491
return natsorted (list (set (kernels )))
0 commit comments