mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-11 07:06:16 +01:00
Rewrite _private.LocalPackage to use Store class
This commit is contained in:
parent
4e773cec32
commit
ba98834160
@ -2,6 +2,7 @@ import functools
|
|||||||
|
|
||||||
from .. import core as osc_core
|
from .. import core as osc_core
|
||||||
from . import api
|
from . import api
|
||||||
|
from . import store
|
||||||
|
|
||||||
|
|
||||||
@functools.total_ordering
|
@functools.total_ordering
|
||||||
@ -78,10 +79,8 @@ class ApiPackage(PackageBase):
|
|||||||
class LocalPackage(PackageBase):
|
class LocalPackage(PackageBase):
|
||||||
def __init__(self, path):
|
def __init__(self, path):
|
||||||
self.dir = path
|
self.dir = path
|
||||||
apiurl = osc_core.store_read_apiurl(self.dir)
|
self.store = store.Store(self.dir)
|
||||||
project = osc_core.store_read_project(self.dir)
|
super().__init__(self.store.apiurl, self.store.project, self.store.package)
|
||||||
package = osc_core.store_read_package(self.dir)
|
|
||||||
super().__init__(apiurl, project, package)
|
|
||||||
|
|
||||||
def _get_directory_node(self):
|
def _get_directory_node(self):
|
||||||
return osc_core.read_filemeta(self.dir).getroot()
|
return self.store.read_xml_node("_files", "directory").getroot()
|
||||||
|
Loading…
Reference in New Issue
Block a user