MCPcopy
hub / github.com/Gallopsled/pwntools / should_check

Function should_check

pwnlib/update.py:121–131  ·  view source on GitHub ↗

Return True if we should check for an update

()

Source from the content-addressed store, hash-verified

119 return time.time()
120
121def should_check():
122 """Return True if we should check for an update"""
123 filename = cache_file()
124
125 if not filename:
126 return False
127
128 if disabled or read(filename).strip() == b'never':
129 return False
130
131 return time.time() > (last_check() + update_freq)
132
133def perform_check(prerelease=current_version.is_prerelease):
134 """Perform the update check, and report to the user.

Callers 1

check_automaticallyFunction · 0.85

Calls 3

readFunction · 0.90
cache_fileFunction · 0.85
last_checkFunction · 0.85

Tested by

no test coverage detected