mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-25 19:52:12 +01:00
Merge branch 'unclear_error_message' of https://github.com/lethliel/osc
Improve error message in rpmquery.py
This commit is contained in:
commit
d83bf74984
@ -114,7 +114,7 @@ class RpmQuery(packagequery.PackageQuery, packagequery.PackageQueryResult):
|
||||
data = self.__file.read(self.LEAD_SIZE)
|
||||
leadmgc, = struct.unpack('!I', data[:4])
|
||||
if leadmgc != self.LEAD_MAGIC:
|
||||
raise RpmError(self.__path, 'invalid lead magic \'%s\'' % leadmgc)
|
||||
raise RpmError(self.__path, 'not a rpm (invalid lead magic \'%s\')' % leadmgc)
|
||||
sigtype, = struct.unpack('!h', data[78:80])
|
||||
if sigtype != self.HEADERSIG_TYPE:
|
||||
raise RpmError(self.__path, 'invalid header signature \'%s\'' % sigtype)
|
||||
|
Loading…
x
Reference in New Issue
Block a user