In function 'bsp_configure' of rtems_bsd.py, when conf.options.rtems_libbsd is None, os.path is not imported, which leads to "UnboundLocalError: local variable 'os' referenced before assignment" error.
This patch tries to avoid that error. ------------------------- diff --git a/rtems_bsd.py b/rtems_bsd.py index eaff438..6074f4d 100644 --- a/rtems_bsd.py +++ b/rtems_bsd.py @@ -48,6 +48,7 @@ def options(opt): help = 'Path to install RTEMS LibBSD (defauls to prefix).') def bsp_configure(conf, arch_bsp): + import os.path conf.check(header_name = 'dlfcn.h', features = 'c') if not rtems.check_posix(conf): conf.fatal("RTEMS kernel POSIX support is disabled; configure RTEMS with --enable-posix") @@ -56,7 +57,6 @@ def bsp_configure(conf, arch_bsp): if conf.options.rtems_libbsd is None: rtems_libbsd_path = conf.env.PREFIX else: - import os.path if not os.path.exists(conf.options.rtems_libbsd): conf.fatal('RTEMS LibBSD not found') rtems_libbsd_path = conf.options.rtems_libbsd
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel