MCPcopy Create free account
hub / github.com/wal-e/wal-e / extract_segment

Function extract_segment

wal_e/cmd.py:149–158  ·  view source on GitHub ↗
(text_with_extractable_segment)

Source from the content-addressed store, hash-verified

147
148
149def extract_segment(text_with_extractable_segment):
150 from wal_e.storage import BASE_BACKUP_REGEXP
151 from wal_e.storage.base import SegmentNumber
152
153 match = re.match(BASE_BACKUP_REGEXP, text_with_extractable_segment)
154 if match is None:
155 return None
156 else:
157 groupdict = match.groupdict()
158 return SegmentNumber(log=groupdict['log'], seg=groupdict['seg'])
159
160
161def parse_boolean_envvar(val):

Callers 1

mainFunction · 0.85

Calls 1

SegmentNumberClass · 0.90

Tested by

no test coverage detected