Skip to content

Commit

Permalink
Update adf_diag.py
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-richling authored Feb 18, 2025
1 parent 568f0e0 commit ad69686
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/adf_diag.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
#################
# Helper functions
#################

'''
def set_warning_filter(enable=True):
"""Enable or disable filtering of print statements containing 'WARNING'."""
original_print = builtins.print
Expand All @@ -113,6 +113,7 @@ def filtered_print(*args, **kwargs):
original_print(*args, **kwargs)
builtins.print = filtered_print if enable else original_print
'''


def construct_index_info(page_dict, fnam, opf):
Expand Down Expand Up @@ -1598,7 +1599,7 @@ def my_formatwarning(msg, *args, **kwargs):




'''
import sys, builtins
def set_warning_filter(enable=True):
"""Enable or disable filtering of print statements containing 'WARNING'."""
Expand Down Expand Up @@ -1640,4 +1641,5 @@ def __enter__(self):
def __exit__(self, exc_type, exc_value, traceback):
"""Restore the original print function."""
sys.modules['builtins'].print = self.original_print
'''
########

0 comments on commit ad69686

Please sign in to comment.