Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
9cbcc108
Verified
Commit
9cbcc108
authored
Jan 05, 2022
by
Baptiste Beauplat
Browse files
Support unsigned uploads (for testing purpose)
parent
62dc554d
Changes
2
Show whitespace changes
Inline
Side-by-side
debexpo/importer/models.py
View file @
9cbcc108
...
@@ -421,8 +421,7 @@ class Importer():
...
@@ -421,8 +421,7 @@ class Importer():
# match their checksum
# match their checksum
try
:
try
:
changes
.
validate
()
changes
.
validate
()
if
not
self
.
skip_gpg
:
changes
.
authenticate
(
not
self
.
skip_gpg
)
changes
.
authenticate
()
if
getattr
(
settings
,
'CHECK_NEWER_UPLOAD'
,
True
):
if
getattr
(
settings
,
'CHECK_NEWER_UPLOAD'
,
True
):
changes
.
assert_newer
()
changes
.
assert_newer
()
changes
.
files
.
validate
()
changes
.
files
.
validate
()
...
...
debexpo/tools/debian/changes.py
View file @
9cbcc108
...
@@ -86,9 +86,17 @@ class Changes(GPGSignedFile):
...
@@ -86,9 +86,17 @@ class Changes(GPGSignedFile):
return
False
return
False
def
authenticate
(
self
):
def
authenticate
(
self
,
gpg
=
True
):
if
gpg
:
super
().
authenticate
()
super
().
authenticate
()
self
.
uploader
=
User
.
objects
.
get
(
key
=
self
.
key
)
self
.
uploader
=
User
.
objects
.
get
(
key
=
self
.
key
)
else
:
user
=
User
.
objects
.
lookup_user_from_address
(
self
.
uploader
)
if
not
user
:
raise
ExceptionChanges
(
f
'No user found for
{
self
.
uploader
}
'
)
self
.
uploader
=
user
def
_build_changes
(
self
):
def
_build_changes
(
self
):
self
.
dsc
=
None
self
.
dsc
=
None
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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