~apport-hackers/apport/main

« back to all changes in this revision

Viewing changes to apport/fileutils.py

  • Committer: Simon Chopin
  • Author(s): Benjamin Drung
  • Date: 2023-04-20 14:26:19 UTC
  • Revision ID: git-v1:f97d29cf4968c22904c562725d73dd5ede807592
refactor: Add type hints to get_starttime()

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
470
470
        return default
471
471
 
472
472
 
473
 
def get_starttime(contents):
 
473
def get_starttime(contents: str) -> int:
474
474
    """Extract the starttime from the contents of a stat file."""
475
475
    # 22nd field in a stat file is the time the process started after
476
476
    # system boot in clock ticks. In order to prevent filename