diff options
author | erkin <e.altunbas@vyos.io> | 2021-11-24 19:43:01 +0300 |
---|---|---|
committer | erkin <e.altunbas@vyos.io> | 2021-11-24 19:43:01 +0300 |
commit | 6577c9725e74c564f23a87e1f91050900f258fe9 (patch) | |
tree | 3b81a5f7062d248809c11975ad84d6fbccf0ab2a /python/vyos/util.py | |
parent | 0040795fc4a23a30eafadc13f8e982e8d0be180a (diff) | |
download | vyos-1x-6577c9725e74c564f23a87e1f91050900f258fe9.tar.gz vyos-1x-6577c9725e74c564f23a87e1f91050900f258fe9.zip |
T3356: Rewrite remote.py
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r-- | python/vyos/util.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py index 9aa1f98d2..d8e83ab8d 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -856,6 +856,20 @@ def make_incremental_progressbar(increment: float): while True: yield +def begin(*args): + """ + Evaluate arguments in order and return the result of the *last* argument. + For combining multiple expressions in one statement. Useful for lambdas. + """ + return args[-1] + +def begin0(*args): + """ + Evaluate arguments in order and return the result of the *first* argument. + For combining multiple expressions in one statement. Useful for lambdas. + """ + return args[0] + def is_systemd_service_active(service): """ Test is a specified systemd service is activated. Returns True if service is active, false otherwise. |