• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

weldr / lorax / 9959262572
42%

Build:
DEFAULT BRANCH: master
Ran 16 Jul 2024 03:01PM UTC
Jobs 1
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jul 2024 02:58PM UTC coverage: 43.457%. Remained the same
9959262572

push

github

bcl
Accept but ignore the old --squashfs-only argument

01dd27a broke lorax due to some unspecified behavior in argparse
when two different arguments write to the same target. It added
a --rootfs-type argument with a string value and a default of
"squashfs", and changed --squashfs-only to write the value
"squashfs" to the same target (rootfs_type) if passed.

Unfortunately, if you do this *with --squashfs-only first and
--rootfs-type second*, then if neither --squashfs-only nor
--rootfs-type is passed, the value of rootfs_type in the
resulting args dict is None, not "squashfs" as expected.

If you reverse the order of the args - so --rootfs-type is first
and --squashfs-only is second - then if neither arg is passed,
the value of rootfs_type comes out as "squashfs" as expected.
So we *could* just swap the args in both places. However, this
strikes me as fragile as it seems like this behaviour is not
defined and could change unexpectedly.

It seems safer, to me, to accept --squashfs-only but simply
ignore it (since the default value of --rootfs-type is squashfs
anyway, and if someone were to specify both, I think it's sane
for --rootfs-type to 'win'). Weirdly, argparse doesn't seem to
have a built-in way to specify a completely no-op argument, so
let's just keep it as `store_true` like it used to be, and
simply never use the value.

Alternatively we could use parse_known_args instead of
parse_args and then check that the only unknown arg was
squashfs-only, but we'd have to do that in multiple places, this
seems a bit simpler.

Signed-off-by: Adam Williamson <awilliam@redhat.com>

591 of 1561 branches covered (37.86%)

Branch coverage included in aggregate %.

0 of 2 new or added lines in 1 file covered. (0.0%)

2 existing lines in 1 file now uncovered.

1634 of 3559 relevant lines covered (45.91%)

0.46 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9959262572.1 16 Jul 2024 03:01PM UTC 0
43.46
Source Files on build 9959262572
Detailed source file information is not available for this build.
  • Back to Repo
  • eff28bcf on github
  • Prev Build on master (#9947212609)
  • Next Build on master (#9965590391)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc