From b68b6cbb8207d3be9abc10cf1fe1f16d8f661395 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 13 Nov 2019 21:47:36 +0000 Subject: [PATCH] create-filelist: update to use python3 Signed-off-by: Kevin Fenzi --- files/scripts/create-filelist | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) mode change 100755 => 100644 files/scripts/create-filelist diff --git a/files/scripts/create-filelist b/files/scripts/create-filelist old mode 100755 new mode 100644 index 89fb32bd0c..06a9f425c1 --- a/files/scripts/create-filelist +++ b/files/scripts/create-filelist @@ -1,5 +1,4 @@ -#!/usr/bin/python -from __future__ import print_function +#!/usr/bin/python3 # A simple script to generate a file list in a format easily consumable by a # shell script. @@ -37,9 +36,9 @@ class SEntry(object): self.name = direntry.name info = direntry.stat(follow_symlinks=False) - # The py2 backport of scandir gives direntrys whose stat info (ctime) - # is an int, while py3 returns a real os.stat result (float). - # Floats blow up mirrormanager UMDL, so let's just always use an int. + # Make sure we have an int here. Whether the stat calls give us ints + # or floats depends on the python version, and the extra precision + # isn't really helpful. self.modtime = int(max(info.st_mtime, info.st_ctime)) self.readable_group = info.st_mode & stat.S_IRGRP self.readable_world = info.st_mode & stat.S_IROTH