mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
cmds.projects.BaseCmdPkgRelations: Code beautification
pkg_relations_list() has an intricate case distinction around expand_semver_revision_range, clean that up. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
8785412eb7
commit
8869a2d3df
1 changed files with 18 additions and 19 deletions
|
|
@ -100,11 +100,10 @@ class BaseCmdPkgRelations(Cmd):
|
|||
pass
|
||||
else:
|
||||
raise Exception("Unknown version specifier in " + spec)
|
||||
if not expand_semver_revision_range:
|
||||
if len(dep) != 3 or not expand_semver_revision_range:
|
||||
expanded_deps = [dep]
|
||||
else:
|
||||
expanded_deps = []
|
||||
if expand_semver_revision_range and len(dep) == 3:
|
||||
semver = re.split(r'[.-]', version)
|
||||
if len(semver) != 4:
|
||||
expanded_deps = [dep]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue