Skip to content

Commit 52e2123

Browse files
committed
update
1 parent 4b3d23d commit 52e2123

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Mailman/Cgi/admin.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,16 +570,20 @@ def show_results(mlist, doc, category, subcat, cgidata):
570570
doc.AddItem(mlist.GetMailmanFooter())
571571

572572
def show_variables(mlist, category, subcat, cgidata, doc):
573+
mailman_log('debug', 'show_variables called with category=%s, subcat=%s', category, subcat)
573574
options = mlist.GetConfigInfo(category, subcat)
575+
mailman_log('debug', 'Got config info: %s', str(options))
574576

575577
# The table containing the results
576578
table = Table(cellspacing=3, cellpadding=4, width='100%')
577579

578580
# Get and portray the text label for the category.
579581
categories = mlist.GetConfigCategories()
582+
mailman_log('debug', 'Got config categories: %s', str(categories))
580583
label = _(categories[category][0])
581584
if isinstance(label, bytes):
582585
label = label.decode('latin1', 'replace')
586+
mailman_log('debug', 'Category label: %s', label)
583587

584588
table.AddRow([Center(Header(2, label))])
585589
table.AddCellInfo(table.GetCurrentRowIndex(), 0, colspan=2,
@@ -590,12 +594,14 @@ def show_variables(mlist, category, subcat, cgidata, doc):
590594
description = options[0]
591595
if isinstance(description, bytes):
592596
description = description.decode('latin1', 'replace')
597+
mailman_log('debug', 'Description: %s', description)
593598
if type(description) is str:
594599
table.AddRow([description])
595600
table.AddCellInfo(table.GetCurrentRowIndex(), 0, colspan=2)
596601
options = options[1:]
597602

598603
if not options:
604+
mailman_log('debug', 'No options to display')
599605
return table
600606

601607
# Add the global column headers
@@ -607,6 +613,7 @@ def show_variables(mlist, category, subcat, cgidata, doc):
607613
width='85%')
608614

609615
for item in options:
616+
mailman_log('debug', 'Processing item: %s', str(item))
610617
if type(item) == str:
611618
# The very first banner option (string in an options list) is
612619
# treated as a general description, while any others are
@@ -621,12 +628,15 @@ def show_variables(mlist, category, subcat, cgidata, doc):
621628
add_options_table_item(mlist, category, subcat, table, item)
622629
table.AddRow(['<br>'])
623630
table.AddCellInfo(table.GetCurrentRowIndex(), 0, colspan=2)
631+
mailman_log('debug', 'Returning table with %d rows', table.GetCurrentRowIndex() + 1)
624632
return table
625633

626634
def add_options_table_item(mlist, category, subcat, table, item, detailsp=1):
635+
mailman_log('debug', 'Adding options table item: %s', str(item))
627636
# Add a row to an options table with the item description and value.
628637
varname, kind, params, extra, descr, elaboration = \
629638
get_item_characteristics(item)
639+
mailman_log('debug', 'Item characteristics: varname=%s, kind=%s', varname, kind)
630640
if elaboration is None:
631641
elaboration = descr
632642
descr = get_item_gui_description(mlist, category, subcat,

0 commit comments

Comments
 (0)