summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/patman/main.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/patman/main.py b/tools/patman/main.py
index 8067a288abc..2a2a7eaa240 100755
--- a/tools/patman/main.py
+++ b/tools/patman/main.py
@@ -7,6 +7,7 @@
"""See README for more information"""
from argparse import ArgumentParser
+import importlib.resources
import os
import re
import sys
@@ -160,11 +161,8 @@ elif args.cmd == 'send':
fd.close()
elif args.full_help:
- tools.print_full_help(
- os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
- 'README.rst')
- )
-
+ with importlib.resources.path('patman', 'README.rst') as readme:
+ tools.print_full_help(str(readme))
else:
# If we are not processing tags, no need to warning about bad ones
if not args.process_tags: