MCPcopy
hub / github.com/borgbackup/borg / show

Method show

src/borg/helpers/progress.py:73–86  ·  view source on GitHub ↗

Show and output the progress message. :param current: Set the current percentage. [None] :param increase: Increase the current percentage. [None] :param info: Array of strings to be formatted with msg. [None]

(self, current=None, increase=1, info=None)

Source from the content-addressed store, hash-verified

71 return pct
72
73 def show(self, current=None, increase=1, info=None):
74 """
75 Show and output the progress message.
76
77 :param current: Set the current percentage. [None]
78 :param increase: Increase the current percentage. [None]
79 :param info: Array of strings to be formatted with msg. [None]
80 """
81 pct = self.progress(current, increase)
82 if pct is not None:
83 if info is not None:
84 return self.output(self.msg % tuple([pct] + info), info=info)
85 else:
86 return self.output(self.msg % pct)
87
88 def output(self, message, info=None):
89 j = self.make_json(message=message, current=self.counter, total=self.total, info=info)

Callers 15

compact_segmentsMethod · 0.95
replay_segmentsMethod · 0.95
checkMethod · 0.95
verify_dataMethod · 0.95
rebuild_archivesMethod · 0.95
analyze_archivesMethod · 0.95
report_and_deleteMethod · 0.95
do_extractMethod · 0.95
do_repo_compressMethod · 0.95
do_pruneMethod · 0.95
analyze_archivesMethod · 0.95

Calls 2

progressMethod · 0.95
outputMethod · 0.95

Tested by 3

test_progress_percentageFunction · 0.76