All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: George McCollister <george.mccollister@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH][fido] wic: fix path parsing, use last occurrence
Date: Mon, 14 Sep 2015 11:19:14 +0300	[thread overview]
Message-ID: <20150914081914.GA14951@linux.intel.com> (raw)
In-Reply-To: <1441906252-28516-1-git-send-email-george.mccollister@gmail.com>

Hi George,

Thank you for the fix!

Acked-by: Ed Bartosh <ed.bartosh@linux.intel.com>

On Thu, Sep 10, 2015 at 12:30:52PM -0500, George McCollister wrote:
> If the path contains 'scripts' more than once the first occurrence will be
> incorrectly used. Use rfind instead of find to find the last occurrence.
> 
> Signed-off-by: George McCollister <george.mccollister@gmail.com>
> ---
>  scripts/lib/wic/plugin.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py
> index 41a8017..3acd5b4 100644
> --- a/scripts/lib/wic/plugin.py
> +++ b/scripts/lib/wic/plugin.py
> @@ -42,7 +42,7 @@ class PluginMgr(object):
>  
>      def __init__(self):
>          wic_path = os.path.dirname(__file__)
> -        eos = wic_path.find('scripts') + len('scripts')
> +        eos = wic_path.rfind('scripts') + len('scripts')
>          scripts_path = wic_path[:eos]
>          self.scripts_path = scripts_path
>          self.plugin_dir = scripts_path + PLUGIN_DIR
> -- 
> 2.4.5
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
--
Regards,
Ed


  reply	other threads:[~2015-09-14  8:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 17:30 [PATCH][fido] wic: fix path parsing, use last occurrence George McCollister
2015-09-14  8:19 ` Ed Bartosh [this message]
2015-09-15 16:02 ` Joshua Lock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150914081914.GA14951@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=george.mccollister@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.