mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
typo in function name
This commit is contained in:
parent
2d92d1009b
commit
bfa3f40279
@ -831,7 +831,7 @@ except NameError:
|
|||||||
from_file = False
|
from_file = False
|
||||||
|
|
||||||
|
|
||||||
def update_intaller_wrapper():
|
def update_installer_wrapper():
|
||||||
# To update: python3 -c "import runpy; runpy.run_path('setup/linux-installer.py', run_name='update_wrapper')"
|
# To update: python3 -c "import runpy; runpy.run_path('setup/linux-installer.py', run_name='update_wrapper')"
|
||||||
with open(__file__, 'rb') as f:
|
with open(__file__, 'rb') as f:
|
||||||
src = f.read().decode('utf-8')
|
src = f.read().decode('utf-8')
|
||||||
@ -839,7 +839,7 @@ def update_intaller_wrapper():
|
|||||||
with open(wrapper, 'r+b') as f:
|
with open(wrapper, 'r+b') as f:
|
||||||
raw = f.read().decode('utf-8')
|
raw = f.read().decode('utf-8')
|
||||||
nraw = re.sub(r'^# HEREDOC_START.+^# HEREDOC_END', lambda m: '# HEREDOC_START\n{}\n# HEREDOC_END'.format(src), raw, flags=re.MULTILINE | re.DOTALL)
|
nraw = re.sub(r'^# HEREDOC_START.+^# HEREDOC_END', lambda m: '# HEREDOC_START\n{}\n# HEREDOC_END'.format(src), raw, flags=re.MULTILINE | re.DOTALL)
|
||||||
if 'update_intaller_wrapper()' not in nraw:
|
if 'update_installer_wrapper()' not in nraw:
|
||||||
raise SystemExit('regex substitute of HEREDOC failed')
|
raise SystemExit('regex substitute of HEREDOC failed')
|
||||||
f.seek(0), f.truncate()
|
f.seek(0), f.truncate()
|
||||||
f.write(nraw.encode('utf-8'))
|
f.write(nraw.encode('utf-8'))
|
||||||
@ -871,4 +871,4 @@ def script_launch():
|
|||||||
if __name__ == '__main__' and from_file:
|
if __name__ == '__main__' and from_file:
|
||||||
main()
|
main()
|
||||||
elif __name__ == 'update_wrapper':
|
elif __name__ == 'update_wrapper':
|
||||||
update_intaller_wrapper()
|
update_installer_wrapper()
|
||||||
|
@ -880,7 +880,7 @@ except NameError:
|
|||||||
from_file = False
|
from_file = False
|
||||||
|
|
||||||
|
|
||||||
def update_intaller_wrapper():
|
def update_installer_wrapper():
|
||||||
# To update: python3 -c "import runpy; runpy.run_path('setup/linux-installer.py', run_name='update_wrapper')"
|
# To update: python3 -c "import runpy; runpy.run_path('setup/linux-installer.py', run_name='update_wrapper')"
|
||||||
with open(__file__, 'rb') as f:
|
with open(__file__, 'rb') as f:
|
||||||
src = f.read().decode('utf-8')
|
src = f.read().decode('utf-8')
|
||||||
@ -888,7 +888,7 @@ def update_intaller_wrapper():
|
|||||||
with open(wrapper, 'r+b') as f:
|
with open(wrapper, 'r+b') as f:
|
||||||
raw = f.read().decode('utf-8')
|
raw = f.read().decode('utf-8')
|
||||||
nraw = re.sub(r'^# HEREDOC_START.+^# HEREDOC_END', lambda m: '# HEREDOC_START\n{}\n# HEREDOC_END'.format(src), raw, flags=re.MULTILINE | re.DOTALL)
|
nraw = re.sub(r'^# HEREDOC_START.+^# HEREDOC_END', lambda m: '# HEREDOC_START\n{}\n# HEREDOC_END'.format(src), raw, flags=re.MULTILINE | re.DOTALL)
|
||||||
if 'update_intaller_wrapper()' not in nraw:
|
if 'update_installer_wrapper()' not in nraw:
|
||||||
raise SystemExit('regex substitute of HEREDOC failed')
|
raise SystemExit('regex substitute of HEREDOC failed')
|
||||||
f.seek(0), f.truncate()
|
f.seek(0), f.truncate()
|
||||||
f.write(nraw.encode('utf-8'))
|
f.write(nraw.encode('utf-8'))
|
||||||
@ -920,7 +920,7 @@ def script_launch():
|
|||||||
if __name__ == '__main__' and from_file:
|
if __name__ == '__main__' and from_file:
|
||||||
main()
|
main()
|
||||||
elif __name__ == 'update_wrapper':
|
elif __name__ == 'update_wrapper':
|
||||||
update_intaller_wrapper()
|
update_installer_wrapper()
|
||||||
|
|
||||||
# HEREDOC_END
|
# HEREDOC_END
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user