(req)
return msg
Returns helpful msg in case requirements file does not exist,
    or cannot be parsed.

    :params req: Requirements file path
Returns helpful msg in case requirements file does not exist,
    or cannot be parsed.
Returns helpful msg in case requirements file does not exist or cannot be parsed .
def deduce_helpful_msg(req):
    # type: (str) -> str
    """Returns helpful msg in case requirements file does not exist,
    or cannot be parsed.

    :params req: Requirements file path
    """
    msg = ""
    if os.path.exists(req):
        msg = " It does exist."
        # Try to parse and check if it is a requirements file.
        try:
            with open(req, 'r') as fp:
                # parse first line only
                next(parse_requirements(fp.read()))
                msg += " The argument you provided " + \
                    "(%s) appears to be a" % (req) + \
                    " requirements file. If that is the" + \
                    " case, use the '-r' flag to install" + \
                    " the packages specified within it."
        except RequirementParseError:
            logger.debug("Cannot parse '%s' as requirements \
            file" % (req), exc_info=True)
    else:
        msg += " File '%s' does not exist." % (req)
    return msg
def deduce_helpful_msg ( req ) : # type: (str) -> str msg = "" if os . path . exists ( req ) : msg = " It does exist." # Try to parse and check if it is a requirements file. try : with open ( req , 'r' ) as fp : # parse first line only next ( parse_requirements ( fp . read ( ) ) ) msg += " The argument you provided " + "(%s) appears to be a" % ( req ) + " requirements file. If that is the" + " case, use the '-r' flag to install" + " the packages specified within it." except RequirementParseError : logger . debug ( "Cannot parse '%s' as requirements \
            file" % ( req ) , exc_info = True ) else : msg += " File '%s' does not exist." % ( req ) return msg