mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
archive: move check for verify_signature into check_dsc_signature
This commit is contained in:
parent
1093c372eb
commit
90824e056c
@ -187,8 +187,7 @@ class SourcePackage(ABC):
|
|||||||
self._dsc = Dsc(f.read())
|
self._dsc = Dsc(f.read())
|
||||||
self.source = self._dsc['Source']
|
self.source = self._dsc['Source']
|
||||||
self._version = Version(self._dsc['Version'])
|
self._version = Version(self._dsc['Version'])
|
||||||
if self._verify_signature:
|
self._check_dsc_signature()
|
||||||
self._check_dsc_signature()
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def lp_spph(self):
|
def lp_spph(self):
|
||||||
@ -286,8 +285,7 @@ class SourcePackage(ABC):
|
|||||||
self.pull_dsc()
|
self.pull_dsc()
|
||||||
with open(self.dsc_pathname, 'rb') as f:
|
with open(self.dsc_pathname, 'rb') as f:
|
||||||
self._dsc = Dsc(f.read())
|
self._dsc = Dsc(f.read())
|
||||||
if self._verify_signature:
|
self._check_dsc_signature()
|
||||||
self._check_dsc_signature()
|
|
||||||
return self._dsc
|
return self._dsc
|
||||||
|
|
||||||
def getDistribution(self):
|
def getDistribution(self):
|
||||||
@ -336,6 +334,8 @@ class SourcePackage(ABC):
|
|||||||
|
|
||||||
def _check_dsc_signature(self):
|
def _check_dsc_signature(self):
|
||||||
"Check that the dsc signature matches what we are expecting"
|
"Check that the dsc signature matches what we are expecting"
|
||||||
|
if not self._verify_signature:
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
gpg_info = self.dsc.get_gpg_info((
|
gpg_info = self.dsc.get_gpg_info((
|
||||||
'/usr/share/keyrings/debian-keyring.gpg',
|
'/usr/share/keyrings/debian-keyring.gpg',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user