def displayOutdated(modules, dependency_specs, use_colours):
if use_colours:<EOL><INDENT>DIM    = colorama.Style.DIM       <EOL>NORMAL = colorama.Style.NORMAL    <EOL>BRIGHT = colorama.Style.BRIGHT    <EOL>YELLOW = colorama.Fore.YELLOW     <EOL>RED    = colorama.Fore.RED        <EOL>GREEN  = colorama.Fore.GREEN      <EOL>RESET  = colorama.Style.RESET_ALL <EOL><DEDENT>else:<EOL><INDENT>DIM = BRIGHT = YELLOW = RED = GREEN = RESET = u'<STR_LIT>'<EOL><DEDENT>status = <NUM_LIT:0><EOL>from yotta.lib import access<EOL>from yotta.lib import access_common<EOL>from yotta.lib import sourceparse<EOL>for name, m in modules.items():<EOL><INDENT>if m.isTestDependency():<EOL><INDENT>continue<EOL><DEDENT>try:<EOL><INDENT>latest_v = access.latestSuitableVersion(name, '<STR_LIT:*>', registry='<STR_LIT>', quiet=True)<EOL><DEDENT>except access_common.Unavailable as e:<EOL><INDENT>latest_v = None<EOL><DEDENT>if not m:<EOL><INDENT>m_version = u'<STR_LIT:U+0020>' + RESET + BRIGHT + RED + u"<STR_LIT>" + RESET<EOL><DEDENT>else:<EOL><INDENT>m_version = DIM + u'<STR_LIT>' % (m.version)<EOL><DEDENT>if not latest_v:<EOL><INDENT>print(u'<STR_LIT>' % (RED, name, m_version, NORMAL, RESET))<EOL>status = <NUM_LIT:2><EOL>continue<EOL><DEDENT>elif not m or m.version < latest_v:<EOL><INDENT>update_prevented_by = '<STR_LIT>'<EOL>if m:<EOL><INDENT>specs_preventing_update = [<EOL>x for x in dependency_specs<EOL>if x.name == name and not<EOL>sourceparse.parseSourceURL(x.nonShrinkwrappedVersionReq()).semanticSpecMatches(latest_v)<EOL>]<EOL>shrinkwrap_prevents_update = [<EOL>x for x in dependency_specs<EOL>if x.name == name and x.isShrinkwrapped() and not<EOL>sourceparse.parseSourceURL(x.versionReq()).semanticSpecMatches(latest_v)<EOL>]<EOL>if len(specs_preventing_update):<EOL><INDENT>update_prevented_by = '<STR_LIT>' % (<EOL>'<STR_LIT:U+002CU+0020>'.join(['<STR_LIT>' % (x.version_req, x.specifying_module) for x in specs_preventing_update])<EOL>)<EOL><DEDENT>if len(shrinkwrap_prevents_update):<EOL><INDENT>update_prevented_by += '<STR_LIT>'<EOL><DEDENT>if m.version.major() < latest_v.major():<EOL><INDENT>colour = GREEN<EOL><DEDENT>elif m.version.minor() < latest_v.minor():<EOL><INDENT>colour = YELLOW<EOL><DEDENT>else:<EOL><INDENT>colour = RED<EOL><DEDENT><DEDENT>else:<EOL><INDENT>colour = RED<EOL><DEDENT>print(u'<STR_LIT>' % (name, m_version, RESET, colour, latest_v.version, update_prevented_by, RESET))<EOL>if not status:<EOL><INDENT>status = <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>return status<EOL>
print information about outdated modules,
        return 0 if there is nothing to be done and nonzero otherwise