Commit 1b664a44 authored by Chris Lamb's avatar Chris Lamb 👀
Browse files

Fix generation of candidate installation time via tune2fs. (Closes: #1075788)

parent f9453a9f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ class Birthday:

    def check_output(self, *args, **kwargs):
        kwargs.setdefault("stderr", subprocess.DEVNULL)
        kwargs.setdefault("env", {"TZ": "UTC"})

        output = subprocess.check_output(*args, **kwargs).decode("utf-8")

@@ -197,7 +198,7 @@ class Birthday:
                dt = datetime.datetime.strptime(
                    lookup["Filesystem created"].strip(),
                    "%a %b %d %H:%M:%S %Y",
                )
                ).replace(tzinfo=datetime.UTC)
                self.log.debug("Found mtime of %s -> %s", device, dt)
                yield dt
            except (KeyError, ValueError):