mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix-up af08d59
(missing parenthesis)
This commit is contained in:
parent
2f28050cac
commit
e48f15be80
|
@ -821,19 +821,17 @@ class TelegramClient(TelegramBareClient):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Remove these pesky characters
|
# Remove these pesky characters
|
||||||
first_name = first_name.replace(';','')
|
first_name = first_name.replace(';', '')
|
||||||
if last_name is None:
|
last_name = (last_name or '').replace(';', '')
|
||||||
last_name = ''
|
|
||||||
else:
|
|
||||||
last_name = last_name.replace(';','')
|
|
||||||
f.write('BEGIN:VCARD\n')
|
f.write('BEGIN:VCARD\n')
|
||||||
f.write('VERSION:4.0\n')
|
f.write('VERSION:4.0\n')
|
||||||
f.write('N:{};{};;;\n'.format(
|
f.write('N:{};{};;;\n'.format(
|
||||||
first_name, last_name)
|
first_name, last_name)
|
||||||
)
|
)
|
||||||
f.write('FN:{} {}\n'.format(first_name, last_name)
|
f.write('FN:{} {}\n'.format(first_name, last_name))
|
||||||
f.write('TEL;TYPE=cell;VALUE=uri:tel:+{}\n'.format(
|
f.write('TEL;TYPE=cell;VALUE=uri:tel:+{}\n'.format(
|
||||||
phone_number))
|
phone_number
|
||||||
|
))
|
||||||
f.write('END:VCARD\n')
|
f.write('END:VCARD\n')
|
||||||
finally:
|
finally:
|
||||||
# Only close the stream if we opened it
|
# Only close the stream if we opened it
|
||||||
|
|
Loading…
Reference in New Issue
Block a user