summaryrefslogtreecommitdiff
path: root/Lib/importlib/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib/util.py')
-rw-r--r--Lib/importlib/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/importlib/util.py b/Lib/importlib/util.py
index 4525b3f78e..af781fd4cd 100644
--- a/Lib/importlib/util.py
+++ b/Lib/importlib/util.py
@@ -22,8 +22,8 @@ def resolve_name(name, package):
if not name.startswith('.'):
return name
elif not package:
- raise ValueError('{!r} is not a relative name '
- '(no leading dot)'.format(name))
+ raise ValueError(f'no package specified for {repr(name)} '
+ '(required for relative module names)')
level = 0
for character in name:
if character != '.':