mirror of https://gitlab.com/bashrc2/epicyon
Create empty minimize file
parent
cae927c91d
commit
3e93474aab
|
@ -54,20 +54,12 @@ def minimizing_attached_images(base_dir: str, nickname: str, domain: str,
|
||||||
if not os.path.isfile(following_filename):
|
if not os.path.isfile(following_filename):
|
||||||
return False
|
return False
|
||||||
# create a new minimize file from the following file
|
# create a new minimize file from the following file
|
||||||
following_handles = None
|
|
||||||
try:
|
try:
|
||||||
with open(following_filename, 'r',
|
with open(minimize_filename, 'w+',
|
||||||
encoding='utf-8') as following_file:
|
encoding='utf-8') as fp_min:
|
||||||
following_handles = following_file.read()
|
fp_min.write('')
|
||||||
except OSError:
|
except OSError:
|
||||||
print('EX: minimizing_attached_images ' + following_filename)
|
print('EX: minimizing_attached_images 2 ' + minimize_filename)
|
||||||
if following_handles:
|
|
||||||
try:
|
|
||||||
with open(minimize_filename, 'w+',
|
|
||||||
encoding='utf-8') as fp_cal:
|
|
||||||
fp_cal.write(following_handles)
|
|
||||||
except OSError:
|
|
||||||
print('EX: minimizing_attached_images 2 ' + minimize_filename)
|
|
||||||
return text_in_file(handle + '\n', minimize_filename)
|
return text_in_file(handle + '\n', minimize_filename)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue