Skip to content

Commit 45a239d

Browse files
committed
Fix Python invocation on Ubuntu 22.04 (jammy)
It doesn't support -P yet. Work around it by changing the directory do /. split-gpg2 shouldn't depend on it.
1 parent d7e75a3 commit 45a239d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

qubes.Gpg2.service

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,15 @@ for d in /etc "${XDG_CONFIG_HOME:-$HOME/.config}"; do
77
fi
88
done
99

10-
/usr/bin/python3 -P -m splitgpg2
10+
# The Python on Ubuntu 22.04 doesn't support -P yet. So don't try to use it
11+
# there.
12+
p=/usr/bin/python3
13+
if $p -P -c '' 2>/dev/null; then
14+
p="$p -P"
15+
else
16+
# Hacky work around. We don't want to search for Python modules in the
17+
# directory we have been invoked.
18+
cd /
19+
fi
20+
21+
$p -m splitgpg2

0 commit comments

Comments
 (0)