Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b9c09878
Commit
b9c09878
authored
May 30, 2011
by
Tarek Ziade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
displaying the faulty project name is a good idea
parent
2da75659
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Lib/packaging/metadata.py
Lib/packaging/metadata.py
+8
-6
No files found.
Lib/packaging/metadata.py
View file @
b9c09878
...
...
@@ -396,22 +396,24 @@ class Metadata:
value
=
[]
if
logger
.
isEnabledFor
(
logging
.
WARNING
):
project_name
=
self
[
'Name'
]
if
name
in
_PREDICATE_FIELDS
and
value
is
not
None
:
for
v
in
value
:
# check that the values are valid predicates
if
not
is_valid_predicate
(
v
.
split
(
';'
)[
0
]):
logger
.
warning
(
'%r is not a valid predicate (field %r)'
,
v
,
name
)
'%r
: %r
is not a valid predicate (field %r)'
,
project_name
,
v
,
name
)
# FIXME this rejects UNKNOWN, is that right?
elif
name
in
_VERSIONS_FIELDS
and
value
is
not
None
:
if
not
is_valid_versions
(
value
):
logger
.
warning
(
'%r is not a valid version (field %r)'
,
value
,
name
)
logger
.
warning
(
'%r
: %r
is not a valid version (field %r)'
,
project_name
,
value
,
name
)
elif
name
in
_VERSION_FIELDS
and
value
is
not
None
:
if
not
is_valid_version
(
value
):
logger
.
warning
(
'%r is not a valid version (field %r)'
,
value
,
name
)
logger
.
warning
(
'%r
: %r
is not a valid version (field %r)'
,
project_name
,
value
,
name
)
if
name
in
_UNICODEFIELDS
:
if
name
==
'Description'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment