MCPcopy Create free account
hub / github.com/StackStorm/st2 / _is_file_changed

Method _is_file_changed

st2api/st2api/controllers/v1/pack_views.py:245–255  ·  view source on GitHub ↗
(self, file_mtime, if_none_match=None, if_modified_since=None)

Source from the content-addressed store, hash-verified

243 return response
244
245 def _is_file_changed(self, file_mtime, if_none_match=None, if_modified_since=None):
246 # For if_none_match check against what would be the ETAG value
247 if if_none_match:
248 return repr(file_mtime) != if_none_match
249
250 # For if_modified_since check against file_mtime
251 if if_modified_since:
252 return if_modified_since != format_date_time(file_mtime)
253
254 # Neither header is provided therefore assume file is changed.
255 return True
256
257
258class PackViewsController(object):

Callers 1

get_oneMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected