Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: risuorg/risu
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.6.4
Choose a base ref
...
head repository: risuorg/risu
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.6.5
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on May 15, 2021

  1. fix(magui.py): fix group processing

    Change-Id: Ie15f2294617b8b3d2b9d03be96a6f01eea705d26
    iranzo committed May 15, 2021
    Copy the full SHA
    5a35a72 View commit details
  2. chore(release): 1.6.5 [skip ci]

    ## [1.6.5](1.6.4...1.6.5) (2021-05-15)
    
    ### Bug Fixes
    
    * **magui.py:** fix group processing ([5a35a72](5a35a72))
    semantic-release-bot committed May 15, 2021
    Copy the full SHA
    bc9d62a View commit details
Showing with 48 additions and 36 deletions.
  1. +6 −0 CHANGELOG.md
  2. +42 −36 maguiclient/magui.py
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [1.6.5](https://github.com/risuorg/risu/compare/1.6.4...1.6.5) (2021-05-15)

### Bug Fixes

- **magui.py:** fix group processing ([5a35a72](https://github.com/risuorg/risu/commit/5a35a720681c9dbb9dd364909998075f5a093cbc))

## [1.6.4](https://github.com/risuorg/risu/compare/1.6.3...1.6.4) (2021-05-15)

### Bug Fixes
78 changes: 42 additions & 36 deletions maguiclient/magui.py
Original file line number Diff line number Diff line change
@@ -290,13 +290,18 @@ def findtarget(data):
minitems = len(subitemcount)

for item in subitemcount:
if subitemcount[item]["count"] < minitems:
if subitemcount[item]["count"] <= minitems:
target = subitemcount[item]["where"][0]
minitems = subitemcount[item]["count"]
if minitems == 1:
todel = item
break

if not target:
target = subitemcount[item]["where"][0]
subitemcount[item]["where"][0]
todel = item

return target, data, todel


@@ -781,44 +786,45 @@ def runmaguiandplugs(

while len(groups) != 0:
target, newgroups, todel = findtarget(groups)
group = target
filename = basefilename[0] + "-" + group + basefilename[1]
print(_("\nRunning for group: %s" % filename))
runautogroup = True

for progroup in processedgroups:
if groups[target] == processedgroups[progroup]:
runautogroup = False
runautofile = progroup

if runautogroup:
# Analysis was missing for this group, run it
# pass grouped as 'dict' to avoid mutable
newgrouped = copy.deepcopy(grouped)
runmaguiandplugs(
sosreports=groups[target],
risuplugins=risuplugins,
filename=filename,
extranames=filenames,
anon=options.anon,
grouped=newgrouped,
)
else:
# Copy file instead of run as it was already existing
LOG.debug("Copying old file from %s to %s" % (runautofile, filename))
shutil.copyfile(runautofile, filename)
if target and target != "":
group = target
filename = basefilename[0] + "-" + group + basefilename[1]
print(_("\nRunning for group: %s" % filename))
runautogroup = True

for progroup in processedgroups:
if groups[target] == processedgroups[progroup]:
runautogroup = False
runautofile = progroup

if runautogroup:
# Analysis was missing for this group, run it
# pass grouped as 'dict' to avoid mutable
newgrouped = copy.deepcopy(grouped)
runmaguiandplugs(
sosreports=groups[target],
risuplugins=risuplugins,
filename=filename,
extranames=filenames,
anon=options.anon,
grouped=newgrouped,
)
else:
# Copy file instead of run as it was already existing
LOG.debug("Copying old file from %s to %s" % (runautofile, filename))
shutil.copyfile(runautofile, filename)

processedgroups[filename] = groups[target]
processedgroups[filename] = groups[target]

if todel:
# We can remove a sosreport from the dataset
for plugin in grouped:
if todel in grouped[plugin]["sosreport"]:
del grouped[plugin]["sosreport"][todel]
if todel:
# We can remove a sosreport from the dataset
for plugin in grouped:
if todel in grouped[plugin]["sosreport"]:
del grouped[plugin]["sosreport"][todel]

del newgroups[target]
# Put remaining groups to work
groups = dict(newgroups)
del newgroups[target]
# Put remaining groups to work
groups = dict(newgroups)

del groups
del processedgroups