MCPcopy Index your code
hub / github.com/pyload/pyload / progress

Method progress

module/plugins/internal/UnRar.py:120–136  ·  view source on GitHub ↗
(self, process)

Source from the content-addressed store, hash-verified

118 return True
119
120 def progress(self, process):
121 s = ""
122 while True:
123 c = process.stdout.read(1)
124 #: Quit loop on eof
125 if not c:
126 break
127 #: Reading a percentage sign -> set progress and restart
128 if c == "%" and s:
129 self.pyfile.setProgress(int(s))
130 s = ""
131 #: Not reading a digit -> therefore restart
132 elif c not in string.digits:
133 s = ""
134 #: Add digit to progressstring
135 else:
136 s += c
137
138 def extract(self, password=None):
139 command = "x" if self.fullpath else "e"

Callers 6

repairMethod · 0.95
extractMethod · 0.95
kbFunction · 0.45
kbFunction · 0.45

Calls 2

setProgressMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected