# -*- coding: utf-8 -*-
#
-# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
def __show_colored_warning(message, category, filename,
- lineno, file = sys.stderr, line = None):
+ lineno, file = None, line = None):
+ if file is None:
+ file = sys.stderr
str = warnings.formatwarning(message, category, filename, lineno, line)
if category == DeprecationWarning and termcolor.canDisplayColor(file):
file.write(termcolor.makeColoredMessage(str, termcolor.BLUE))