Add 'warning' as an alias to 'warn'

The standard Python logging system uses 'warning' and not 'warn'. To
ease compatibility with it, let's add 'warning' too.

Change-Id: I7778d7960ca7a72be007cb083e5434ede6e3fe6e
This commit is contained in:
Julien Danjou 2013-11-20 14:31:40 +01:00
parent f137822ab0
commit 5912b58233
1 changed files with 2 additions and 0 deletions

View File

@ -206,6 +206,8 @@ class Notifier(object):
"""
self._notify(ctxt, event_type, payload, 'WARN')
warning = warn
def error(self, ctxt, event_type, payload):
"""Send a notification at error level.