From 8fa1ea3f4f40307904da0e41f295ba269e04cb6c Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Wed, 8 Nov 2023 14:23:27 +0000 Subject: [PATCH] Modernize for py3: long -> int / file() -> open() Signed-off-by: Bernhard Kaindl --- xen-bugtool | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen-bugtool b/xen-bugtool index bc73a320..8771b3d3 100755 --- a/xen-bugtool +++ b/xen-bugtool @@ -1591,9 +1591,9 @@ def load_plugins(just_capabilities = False): if xmldoc.documentElement.getAttribute("pii") in [PII_NO, PII_YES, PII_MAYBE, PII_IF_CUSTOMIZED]: pii = xmldoc.documentElement.getAttribute("pii") if xmldoc.documentElement.getAttribute("min_size") != '': - min_size = long(xmldoc.documentElement.getAttribute("min_size")) + min_size = int(xmldoc.documentElement.getAttribute("min_size")) if xmldoc.documentElement.getAttribute("max_size") != '': - max_size = long(xmldoc.documentElement.getAttribute("max_size")) + max_size = int(xmldoc.documentElement.getAttribute("max_size")) if xmldoc.documentElement.getAttribute("min_time") != '': min_time = int(xmldoc.documentElement.getAttribute("min_time")) if xmldoc.documentElement.getAttribute("max_time") != '': @@ -1720,7 +1720,7 @@ class TarOutput(ArchiveWithTarSubarchives): s = os.stat(filename) ti.mtime = s.st_mtime ti.size = s.st_size - self.tf.addfile(ti, file(filename,'rb')) + self.tf.addfile(ti, open(filename, "rb")) def add_path_with_data(self, name, data): ti = self._getTi(name)