()
| 153 | return os.path.isdir(sdk_dir) |
| 154 | |
| 155 | def should_update_tool_json(): |
| 156 | global ttbuild_cdn |
| 157 | json_filepath = os.path.join(ttbuild_path, "tool.json") |
| 158 | if os.path.exists(json_filepath): |
| 159 | json_modification_time = os.path.getmtime(json_filepath) |
| 160 | now = time.time() |
| 161 | global ttbuild_sdk_json_validity |
| 162 | minimum_seconds_difference = ttbuild_sdk_json_validity |
| 163 | return (now - json_modification_time) > minimum_seconds_difference |
| 164 | else: |
| 165 | return True |
| 166 | |
| 167 | def update_tool_json(): |
| 168 | global ttbuild_cdn, ttbuild_path |
no test coverage detected