Skip to contentSkip to conversation

main: Change warn() -> warning()

PATCH New Richard Purdie 1 participant 1 message May 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 main: Change warn() -> warning()

This avoids a deprecation warning in python 3.

lib/bb/main.py +1 -1
index a0e6425..a287905 100755
@@ -117,7 +117,7 @@ def _showwarning(message, category, filename, lineno, file=None, line=None):
             _warnings_showwarning(message, category, filename, lineno, file, line)
     else:
         s = warnings.formatwarning(message, category, filename, lineno)
-        warnlog.warn(s)
+        warnlog.warning(s)
 
 warnings.showwarning = _showwarning
 warnings.filterwarnings("ignore")