mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
Improve readability.
This commit is contained in:
parent
e937782a4e
commit
b48a66a2e5
1 changed files with 3 additions and 4 deletions
|
@ -46,12 +46,11 @@ class UnsquashOperation:
|
|||
def reportProgress( self ):
|
||||
progress = float( 0 )
|
||||
for statusEntry in self.unpackstatus:
|
||||
partialProgress = float( 0 )
|
||||
if statusEntry.total is not 0:
|
||||
partialProgress += 0.05
|
||||
else:
|
||||
if statusEntry.total == 0:
|
||||
continue
|
||||
|
||||
partialProgress = 0.05 # Having a total !=0 gives 5%
|
||||
|
||||
partialProgress += 0.95 * ( statusEntry.copied / float( statusEntry.total ) )
|
||||
progress += partialProgress / len( self.unpackstatus )
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue