Skip to content

Commit

Permalink
Support pretty print for the version default module
Browse files Browse the repository at this point in the history
  • Loading branch information
xumia committed Jan 5, 2023
1 parent 275326d commit 7cd6a4d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/versions_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,24 +562,27 @@ def filter(self, ctypes=[]):
module.filter(ctypes=ctypes)

def get_default_module(self):
if DEFAULT_MODULE in self.modules:
return self.modules[DEFAULT_MODULE]
default_module = self.modules.get(DEFAULT_MODULE, VersionModule(DEFAULT_MODULE, []))
ctypes = self.get_component_types()
dists = self.get_dists()
components = []
for ctype in ctypes:
if ctype in DEFAULT_OVERWRITE_COMPONENTS:
continue
if ctype == 'deb':
for dist in dists:
versions = self._get_versions(ctype, dist)
common_versions = self._get_common_versions(versions)
component = Component(self.verbose, common_versions, ctype, dist)
component = Component(common_versions, ctype, dist)
components.append(component)
else:
versions = self._get_versions(ctype)
common_versions = self._get_common_versions(versions)
component = Component(self.verbose, common_versions, ctype)
component = Component(common_versions, ctype)
components.append(component)
return VersionModule(self.verbose, DEFAULT_MODULE, components)
module = VersionModule(DEFAULT_MODULE, components)
module.overwrite(default_module, True, True)
return module

def get_aggregatable_modules(self):
modules = {}
Expand Down

0 comments on commit 7cd6a4d

Please sign in to comment.