Skip to content

Commit

Permalink
updater: add --signal-no-updates flag
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Jun 26, 2024
1 parent ff9900e commit 15dc1f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qui/updater/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ def parse_args(args, app):
help='Maximum number of VMs configured simultaneously '
'(default: number of cpus)',
type=int)
parser.add_argument(
'--signal-no-updates', action='store_true',
help='Return exit code 100 instread of 0 '
'if there is no updates available.')

restart = parser.add_mutually_exclusive_group()
restart.add_argument(
Expand Down Expand Up @@ -431,6 +435,8 @@ def main(args=None):
cliargs = parse_args(args, qapp)

Check warning on line 435 in qui/updater/updater.py

View check run for this annotation

Codecov / codecov/patch

qui/updater/updater.py#L435

Added line #L435 was not covered by tests
app = QubesUpdater(qapp, cliargs)
app.run()
if app.retcode == 100 and not app.cliargs.signal_no_updates:
app.retcode = 0
sys.exit(app.retcode)

Check warning on line 440 in qui/updater/updater.py

View check run for this annotation

Codecov / codecov/patch

qui/updater/updater.py#L438-L440

Added lines #L438 - L440 were not covered by tests


Expand Down

0 comments on commit 15dc1f1

Please sign in to comment.