From 19a5e2e36d91fa2d8ee16cbba873cec7807d920e Mon Sep 17 00:00:00 2001 From: Hunor Csomortáni Date: Aug 03 2021 08:19:01 +0000 Subject: Don't use str.removeprefix() This string method got introduced only in Python 3.9. Not all installations have this version. Signed-off-by: Hunor Csomortáni --- diff --git a/packit/specfile.py b/packit/specfile.py index b1b6fcd..aa8adb9 100644 --- a/packit/specfile.py +++ b/packit/specfile.py @@ -265,7 +265,7 @@ class Specfile(SpecFile): comment = [] # Remember a comment line. if line.startswith("#"): - comment.append(line.removeprefix("#").strip()) + comment.append(line[1:].strip()) # Associate comments with patches and clear the comments # collected. if line.lower().startswith("patch"):