mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
- fix for older python versions
This commit is contained in:
parent
2123e136e0
commit
cc6d7413fb
@ -4,7 +4,7 @@ class PackageError(Exception):
|
|||||||
Exception.__init__(self)
|
Exception.__init__(self)
|
||||||
self.msg = msg
|
self.msg = msg
|
||||||
|
|
||||||
class PackageQuery():
|
class PackageQuery:
|
||||||
"""abstract base class for all package types"""
|
"""abstract base class for all package types"""
|
||||||
def read(self):
|
def read(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
@ -8,7 +8,7 @@ class RpmError(packagequery.PackageError):
|
|||||||
class RpmHeaderError(RpmError):
|
class RpmHeaderError(RpmError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class RpmHeader():
|
class RpmHeader:
|
||||||
"""corresponds more or less to the indexEntry_s struct"""
|
"""corresponds more or less to the indexEntry_s struct"""
|
||||||
def __init__(self, offset, length):
|
def __init__(self, offset, length):
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
@ -32,7 +32,7 @@ class RpmHeader():
|
|||||||
def __len__(self):
|
def __len__(self):
|
||||||
return len(self.entries)
|
return len(self.entries)
|
||||||
|
|
||||||
class RpmHeaderEntry():
|
class RpmHeaderEntry:
|
||||||
"""corresponds to the entryInfo_s struct (except the data attribute)"""
|
"""corresponds to the entryInfo_s struct (except the data attribute)"""
|
||||||
|
|
||||||
# each element represents an int
|
# each element represents an int
|
||||||
|
Loading…
Reference in New Issue
Block a user