[PATCH] rteval-cmd: added code to handle downloading kernel versions of the x.x format.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rteval-cmd: added code to handle downloading kernel versions of the x.x
format

Signed-off-by: Anubhav Shelat <ashelat@xxxxxxxxxx>
---
 rteval-cmd | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/rteval-cmd b/rteval-cmd
index cbba9cd2e451..d019da41d8d3 100755
--- a/rteval-cmd
+++ b/rteval-cmd
@@ -291,7 +291,11 @@ 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:
-                kernel_prefix = re.search(r"\d{1,2}\.\d{1,3}\.*\d{1,2}", rtevcfg.srcdownload).group(0)
+                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)
                 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




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux