/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2019-08-24 14:46:13 UTC
  • Revision ID: teddy@recompile.se-20190824144613-z46mn4m8v5x2ifnj
Server: Show Python warnings

* mandos: Show Python warnings, and use the logging system to do it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
if sys.version_info.major == 2:
93
93
    __metaclass__ = type
94
94
 
 
95
# Show warnings by default
 
96
if not sys.warnoptions:
 
97
    import warnings
 
98
    warnings.simplefilter("default")
 
99
 
95
100
# Try to find the value of SO_BINDTODEVICE:
96
101
try:
97
102
    # This is where SO_BINDTODEVICE is in Python 3.3 (or 3.4?) and
127
132
stored_state_file = "clients.pickle"
128
133
 
129
134
logger = logging.getLogger()
 
135
logging.captureWarnings(True)   # Show warnings via the logging system
130
136
syslogger = None
131
137
 
132
138
try: