Rename argument fpobj -> path.
This commit is contained in:
parent
0d4349e942
commit
e7798574b3
1 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ class SpinalError(SpinalException):
|
|||
class ValidationError(SpinalException):
|
||||
pass
|
||||
|
||||
def callback_progress_v1(fpobj, written_bytes, total_bytes):
|
||||
def callback_progress_v1(path, written_bytes, total_bytes):
|
||||
'''
|
||||
Example of a copy callback function.
|
||||
|
||||
|
@ -61,7 +61,7 @@ def callback_progress_v1(fpobj, written_bytes, total_bytes):
|
|||
written = '{:,}'.format(written_bytes)
|
||||
total = '{:,}'.format(total_bytes)
|
||||
written = written.rjust(len(total), ' ')
|
||||
status = f'{fpobj.absolute_path} {written}/{total} ({percent}%)\r'
|
||||
status = f'{path.absolute_path} {written}/{total} ({percent}%)\r'
|
||||
safeprint.safeprint(status, end=ends)
|
||||
sys.stdout.flush()
|
||||
|
||||
|
|
Loading…
Reference in a new issue