Don't use .warn on loggers, use .warning instead.
This commit is contained in:
parent
cee0dea9c4
commit
bf9e829d4d
@ -243,7 +243,7 @@ class Application(QApplication):
|
||||
try:
|
||||
os.remove(logname)
|
||||
except PermissionError:
|
||||
log.init.warn("Could not remove crash log!")
|
||||
log.init.warning("Could not remove crash log!")
|
||||
else:
|
||||
self._init_crashlogfile()
|
||||
self._crashdlg = FatalCrashDialog(data)
|
||||
@ -253,11 +253,11 @@ class Application(QApplication):
|
||||
# This means another instance is probably still running and
|
||||
# didn't remove the file. As we can't write to the same file,
|
||||
# we just leave faulthandler as it is and log to stderr.
|
||||
log.init.warn("Empty crash log detected. This means either "
|
||||
"another instance is running (then ignore this "
|
||||
"warning) or the file is lying here because "
|
||||
"of some earlier crash (then delete {}).".format(
|
||||
logname))
|
||||
log.init.warning("Empty crash log detected. This means either "
|
||||
"another instance is running (then ignore "
|
||||
"this warning) or the file is lying here "
|
||||
"because of some earlier crash (then delete "
|
||||
"{}).".format(logname))
|
||||
self._crashlogfile = None
|
||||
else:
|
||||
# There's no log file, so we can use this to display crashes to the
|
||||
@ -472,7 +472,7 @@ class Application(QApplication):
|
||||
try:
|
||||
os.remove(self._crashlogfile.name)
|
||||
except PermissionError as e:
|
||||
log.destroy.warn("Could not remove crash log ({})!".format(e))
|
||||
log.destroy.warning("Could not remove crash log ({})!".format(e))
|
||||
|
||||
def _exception_hook(self, exctype, excvalue, tb):
|
||||
"""Handle uncaught python exceptions.
|
||||
|
@ -74,7 +74,7 @@ class SignalFilter(QObject):
|
||||
log_signal = not signal.signal.startswith('2cur_progress')
|
||||
if not isinstance(sender, WebView):
|
||||
# BUG? This should never happen, but it does regularely...
|
||||
logger.warn("Got signal {} by {} which is no tab!".format(
|
||||
logger.warning("Got signal {} by {} which is no tab!".format(
|
||||
dbg_signal(signal, args), sender))
|
||||
return
|
||||
if self._tabs.currentWidget() == sender:
|
||||
|
@ -127,7 +127,7 @@ def _release_info():
|
||||
with open(fn, 'r') as f:
|
||||
data.append((fn, ''.join(f.readlines())))
|
||||
except IOError as e:
|
||||
logger.warn("Error while reading {}: {}: {}".format(
|
||||
logger.warning("Error while reading {}: {}: {}".format(
|
||||
fn, e.__class__.__name__, e))
|
||||
return data
|
||||
|
||||
@ -149,7 +149,7 @@ def _module_versions():
|
||||
lines.append('SIP: {}'.format(
|
||||
sipconfig.Configuration().sip_version_str))
|
||||
except (AttributeError, TypeError) as e:
|
||||
logger.warn("Error while getting SIP version: {}: {}".format(
|
||||
logger.warning("Error while getting SIP version: {}: {}".format(
|
||||
e.__class__.__name__, e))
|
||||
lines.append('SIP: ?')
|
||||
|
||||
|
@ -60,18 +60,18 @@ class MainWindow(QWidget):
|
||||
geom = b64decode(stateconf['geometry']['mainwindow'],
|
||||
validate=True)
|
||||
except (KeyError, binascii.Error) as e:
|
||||
logger.warn("Error while reading geometry: {}: {}".format(
|
||||
logger.warning("Error while reading geometry: {}: {}".format(
|
||||
e.__class__.__name__, e))
|
||||
self._set_default_geometry()
|
||||
else:
|
||||
try:
|
||||
ok = self.restoreGeometry(geom)
|
||||
except KeyError:
|
||||
logger.warn("Error while restoring geometry: {}: {}".format(
|
||||
logger.warning("Error while restoring geometry: {}: {}".format(
|
||||
e.__class__.__name__, e))
|
||||
self._set_default_geometry()
|
||||
if not ok:
|
||||
logger.warn("Error while restoring geometry.")
|
||||
logger.warning("Error while restoring geometry.")
|
||||
self._set_default_geometry()
|
||||
|
||||
self._vbox = QVBoxLayout(self)
|
||||
|
Loading…
Reference in New Issue
Block a user