From 995a8f16fd7c574fd62e3e11ceec4a51a141949e Mon Sep 17 00:00:00 2001 From: Michael Prokop <mprokop@sipwise.com> Date: Wed, 5 Jul 2023 11:54:30 +0200 Subject: [PATCH] MT#56773 debian: support python3 The python binary is gone, and use and support python3 instead. Fixes: | Setting up repoapi (0.4.6+0~20230705093550.1012+bookworm~1.gbp7c23af) ... | /var/lib/dpkg/info/repoapi.postinst: 21: python: not found | dpkg: error processing package repoapi (--configure): | installed repoapi package post-installation script subprocess returned error exit status 127 Change-Id: I54c02826da75fb2a01ee307aeab850978034c9da --- debian/repoapi.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/repoapi.postinst b/debian/repoapi.postinst index 2913bdb..52046cd 100644 --- a/debian/repoapi.postinst +++ b/debian/repoapi.postinst @@ -18,7 +18,7 @@ LIB_DIR=/var/lib/repoapi # the debian-policy package mk_dj_secret() { - python -c "import random,string;print '%s'%''.join([random.SystemRandom().choice(\"{}{}{}\".format(string.ascii_letters, string.digits, string.punctuation)) for i in range(63)])" ; + python3 -c "import random, string; print(''.join(random.SystemRandom().choice(string.ascii_letters + string.digits + string.punctuation) for _ in range(63)))"; } case "$1" in