linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: Anubhav Shelat <ashelat@redhat.com>
Cc: linux-rt-users@vger.kernel.org, kcarcia@redhat.com
Subject: Re: [PATCH v3 2/2] Edited code from previous commit to exclude try-except block
Date: Fri, 30 Jun 2023 13:50:49 -0400 (EDT)	[thread overview]
Message-ID: <fb3e2c9c-14b1-ed3d-3ccc-cdc898ca67b@redhat.com> (raw)
In-Reply-To: <20230630171017.1072241-2-ashelat@redhat.com>



On Fri, 30 Jun 2023, Anubhav Shelat wrote:

> Edited code, from previous commit that allowed -S to download kernel
> versions of the form x.y, to exclude try-except block.
> 
> Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
> ---
>  rteval-cmd | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/rteval-cmd b/rteval-cmd
> index d019da41d8d3..44921dfe0764 100755
> --- a/rteval-cmd
> +++ b/rteval-cmd
> @@ -291,11 +291,7 @@ if __name__ == '__main__':
>                  kernel_prefix = re.search(r"\d{1,2}\.\d{1,3}\-[a-z]*\d{1,2}", rtevcfg.srcdownload).group(0)
>                  url = "https://git.kernel.org/torvalds/t/"
>              else:
> -                try:
> -                    kernel_prefix = re.search(r"\d{1,2}\.\d{1,3}\.*\d{1,2}", rtevcfg.srcdownload).group(0)
> -                except AttributeError:
> -                    # if kernel version specified is of the form x.x and not x.x.x
> -                    kernel_prefix = re.search(r"\d{1,2}\.\d{1,3}", rtevcfg.srcdownload).group(0)
> +                kernel_prefix = re.search(r"(\d{1,2}\.\d{1,3}\.\d{1,3})|(\d{1,2}\.\d{1,3})", rtevcfg.srcdownload).group(0)
>                  major_version = re.search(r"\d{1,2}", kernel_prefix).group(0)
>                  url = "https://kernel.org/pub/linux/kernel/v" + major_version + ".x/"
>  
> -- 
> 2.39.3
> 
> 
- Modified comment
Signed-off-by: John Kacur <jkacur@redhat.com>


  reply	other threads:[~2023-06-30 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 17:10 [PATCH v3 1/2] Fixed bug in kcompile where run would fail if kcompile-source version had the form x.y instead of x.y.z Anubhav Shelat
2023-06-30 17:10 ` [PATCH v3 2/2] Edited code from previous commit to exclude try-except block Anubhav Shelat
2023-06-30 17:50   ` John Kacur [this message]
2023-06-30 17:47 ` [PATCH v3 1/2] Fixed bug in kcompile where run would fail if kcompile-source version had the form x.y instead of x.y.z John Kacur

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=fb3e2c9c-14b1-ed3d-3ccc-cdc898ca67b@redhat.com \
    --to=jkacur@redhat.com \
    --cc=ashelat@redhat.com \
    --cc=kcarcia@redhat.com \
    --cc=linux-rt-users@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).