Created
October 11, 2016 10:54
-
-
Save Psycojoker/a9d14a57dfb88b7f5d70afc6446ca42f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # condition originelle | |
| (new_app_dict['lastUpdate'] > current_app_dict['lastUpdate']) \ | |
| or ('update_time' not in current_app_dict['settings'] \ | |
| and (new_app_dict['lastUpdate'] > current_app_dict['settings']['install_time'])) \ | |
| or ('update_time' in current_app_dict['settings'] \ | |
| and (new_app_dict['lastUpdate'] > current_app_dict['settings']['update_time'])) | |
| # hypothèse que new_app_dict == current_app_dict d'après | |
| # https://github.com/YunoHost/yunohost/blob/unstable/src/yunohost/app.py#L366-L367 | |
| ('update_time' not in current_app_dict['settings'] \ | |
| and (new_app_dict['lastUpdate'] > current_app_dict['settings']['install_time'])) \ | |
| or ('update_time' in current_app_dict['settings'] \ | |
| and (new_app_dict['lastUpdate'] > current_app_dict['settings']['update_time'])) | |
| # réécriture | |
| last_app_update_time = current_app_dict["settings"].get("update_time" current_app_dict["settings"]["install_time"]) | |
| new_app_dict['lastUpdate'] > last_app_update_time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment