All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 3/6] ksize.py: Python 3 fixes
Date: Tue, 3 Jan 2017 22:39:33 -0800	[thread overview]
Message-ID: <CAMKF1soP7afwicknqti_muFYwGrMgNZE+n3rfnVQ8Hg8NeU2aw@mail.gmail.com> (raw)
In-Reply-To: <5e3840aa19de9b634469c852a7c1446262ab73ab.1482363237.git.alejandro.hernandez@linux.intel.com>

On Tue, Jan 3, 2017 at 2:30 PM, Alejandro Hernandez
<alejandro.hernandez@linux.intel.com> wrote:
> From: Tom Zanussi <tom.zanussi@linux.intel.com>
>
> String errors and partial __cmp__ fix.

may be fold it into previous patch.

>
> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
> ---
>  scripts/tiny/ksize.py | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
> index b9d2b19..ea1ca7f 100755
> --- a/scripts/tiny/ksize.py
> +++ b/scripts/tiny/ksize.py
> @@ -41,7 +41,7 @@ def usage():
>  class Sizes:
>      def __init__(self, glob):
>          self.title = glob
> -        p = Popen("size -t " + glob, shell=True, stdout=PIPE, stderr=PIPE)
> +        p = Popen("size -t " + str(glob), shell=True, stdout=PIPE, stderr=PIPE)
>          output = p.communicate()[0].splitlines()
>          if len(output) > 2:
>              sizes = output[-1].split()[0:4]
> @@ -62,18 +62,18 @@ class Report:
>          r = Report(filename, title)
>          path = os.path.dirname(filename)
>
> -        p = Popen("ls " + path + "/*.o | grep -v built-in.o",
> +        p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
>                    shell=True, stdout=PIPE, stderr=PIPE)
>          glob = ' '.join(p.communicate()[0].splitlines())
> -        oreport = Report(glob, path + "/*.o")
> -        oreport.sizes.title = path + "/*.o"
> +        oreport = Report(glob, str(path) + "/*.o")
> +        oreport.sizes.title = str(path) + "/*.o"
>          r.parts.append(oreport)
>
>          if subglob:
>              p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE)
>              for f in p.communicate()[0].splitlines():
>                  path = os.path.dirname(f)
> -                r.parts.append(Report.create(f, path, path + "/*/built-in.o"))
> +                r.parts.append(Report.create(f, path, str(path) + "/*/built-in.o"))
>              r.parts.sort(reverse=True)
>
>          for b in r.parts:
> @@ -116,6 +116,13 @@ class Report:
>                 self.deltas["data"], self.deltas["bss"]))
>          print("\n")
>
> +    def __lt__(this, that):
> +        if that is None:
> +            return 1
> +        if not isinstance(that, Report):
> +            raise TypeError
> +        return this.sizes.total < that.sizes.total
> +
>      def __cmp__(this, that):
>          if that is None:
>              return 1
> --
> 2.6.6
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


  reply	other threads:[~2017-01-04  6:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 22:30 [PATCH 0/6] poky-tiny improvements Alejandro Hernandez
2017-01-03 22:30 ` [PATCH 1/6] image-live-artifacts: Add support for creating image artifacts only Alejandro Hernandez
2017-01-03 22:41   ` Richard Purdie
2017-01-03 22:30 ` [PATCH 2/6] core-image-tiny-initramfs: Add and image " Alejandro Hernandez
2017-01-04 18:29   ` Leonardo Sandoval
2017-01-03 22:30 ` [PATCH 3/6] ksize.py: Python 3 fixes Alejandro Hernandez
2017-01-04  6:39   ` Khem Raj [this message]
2017-01-04 18:21     ` Alejandro Hernandez
2017-01-04 22:18       ` Alejandro Hernandez
2017-01-04 23:52         ` Khem Raj
2017-01-03 22:30 ` [PATCH 4/6] scripts/tiny/ksum.py: New tool Alejandro Hernandez
2017-01-04  6:38   ` Khem Raj
2017-01-03 22:30 ` [PATCH 5/6] bootimg-efi: Look for image artifacts in a common location Alejandro Hernandez
2017-01-03 22:30 ` [PATCH 6/6] core-image-tiny-initramfs: Fix error message shown after a successful initrd boot Alejandro Hernandez

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=CAMKF1soP7afwicknqti_muFYwGrMgNZE+n3rfnVQ8Hg8NeU2aw@mail.gmail.com \
    --to=raj.khem@gmail.com \
    --cc=alejandro.hernandez@linux.intel.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.