mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +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 api
|
||||
from . import store
|
||||
|
||||
|
||||
@functools.total_ordering
|
||||
@ -78,10 +79,8 @@ class ApiPackage(PackageBase):
|
||||
class LocalPackage(PackageBase):
|
||||
def __init__(self, path):
|
||||
self.dir = path
|
||||
apiurl = osc_core.store_read_apiurl(self.dir)
|
||||
project = osc_core.store_read_project(self.dir)
|
||||
package = osc_core.store_read_package(self.dir)
|
||||
super().__init__(apiurl, project, package)
|
||||
self.store = store.Store(self.dir)
|
||||
super().__init__(self.store.apiurl, self.store.project, self.store.package)
|
||||
|
||||
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