mirror of
https://git.yoctoproject.org/poky
synced 2026-02-05 16:28:43 +01:00
StandardError doesn't exist in python 3, use Exception instead. (Bitbake rev: 4a40046036493f0cdf0f66487ad5ce083461a5c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14 lines
421 B
Python
14 lines
421 B
Python
__version__ = "1.0.0"
|
|
|
|
import os, time
|
|
import sys,logging
|
|
|
|
def init_logger(logfile, loglevel):
|
|
numeric_level = getattr(logging, loglevel.upper(), None)
|
|
if not isinstance(numeric_level, int):
|
|
raise ValueError('Invalid log level: %s' % loglevel)
|
|
FORMAT = '%(asctime)-15s %(message)s'
|
|
logging.basicConfig(level=numeric_level, filename=logfile, format=FORMAT)
|
|
|
|
class NotFoundError(Exception):
|
|
pass |