[Kimchi-devel] [PATCH v2 4/8] Debug Report: Use Generated Time instead of Most Changed Time
Sheldon
shaohef at linux.vnet.ibm.com
Thu May 22 13:48:04 UTC 2014
Reviewed-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
On 05/22/2014 03:55 PM, Hongliang Wang wrote:
> Currently debug report generation time is ctime, which stands for change time.
> Though getting creation time for file is dependent to platforms, and we'll use
> mtime which stands for modification time and for our case because debug report
> file will not be modified since it is generated. So mtime suits for our case.
>
> Signed-off-by: Hongliang Wang <hlwang at linux.vnet.ibm.com>
> ---
> src/kimchi/model/debugreports.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/kimchi/model/debugreports.py b/src/kimchi/model/debugreports.py
> index 43c4fb6..ad10b24 100644
> --- a/src/kimchi/model/debugreports.py
> +++ b/src/kimchi/model/debugreports.py
> @@ -163,7 +163,7 @@ class DebugReportModel(object):
> except IndexError:
> raise NotFoundError("KCHDR0001E", {'name': name})
>
> - ctime = os.stat(file_target).st_ctime
> + ctime = os.stat(file_target).st_mtime
> ctime = time.strftime("%Y-%m-%d-%H:%M:%S", time.localtime(ctime))
> file_target = os.path.split(file_target)[-1]
> file_target = os.path.join("/data/debugreports", file_target)
--
Thanks and best regards!
Sheldon Feng(冯少合)<shaohef at linux.vnet.ibm.com>
IBM Linux Technology Center
More information about the Kimchi-devel
mailing list