From 54adf80eab2cd1660539b09c72af85c12abc53d7 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Mon, 20 Feb 2017 17:57:51 +0000 Subject: [PATCH] target: Add KernelVersion docstring --- devlib/target.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/devlib/target.py b/devlib/target.py index 5fd6bb9..4229362 100644 --- a/devlib/target.py +++ b/devlib/target.py @@ -1189,7 +1189,29 @@ class Cpuinfo(object): class KernelVersion(object): + """ + Class representing the version of a target kernel + Not expected to work for very old (pre-3.0) kernel version numbers. + + :ivar release: Version number/revision string. Typical output of + ``uname -r`` + :type release: str + :ivar version: Extra version info (aside from ``release``) reported by + ``uname`` + :type version: str + :ivar version_number: Main version number (e.g. 3 for Linux 3.18) + :type version_number: int + :ivar major: Major version number (e.g. 18 for Linux 3.18) + :type major: int + :ivar minor: Minor version number for stable kernels (e.g. 9 for 4.9.9). May + be None + :type minor: int + :ivar rc: Release candidate number (e.g. 3 for Linux 4.9-rc3). May be None. + :type rc: int + :ivar sha1: Kernel git revision hash, if available (otherwise None) + :type sha1: str + """ def __init__(self, version_string): if ' #' in version_string: release, version = version_string.split(' #')