mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 10:18:03 +02:00
examples: fix handling "--last" argument in "examples/python/gi/checkpoint.py"
Fixes:3ce3ed4c92('examples: improve finding last checkpoint in "checkpoint.py"') (cherry picked from commit135bbcc0e4)
This commit is contained in:
parent
8bb16e44d2
commit
b30ac826c5
1 changed files with 3 additions and 3 deletions
|
|
@ -80,10 +80,10 @@ def find_checkpoint_last(nmc):
|
||||||
|
|
||||||
def validate_path(path, nmc):
|
def validate_path(path, nmc):
|
||||||
if path == "--last":
|
if path == "--last":
|
||||||
path = find_checkpoint_last(nmc)
|
c = find_checkpoint_last(nmc)
|
||||||
if path is None:
|
if c is None:
|
||||||
sys.exit("Has no checkpoint")
|
sys.exit("Has no checkpoint")
|
||||||
return path
|
return c.get_path()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
num = int(path)
|
num = int(path)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue