mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
fix get_files_diff if {orig,new}_file is None
This commit is contained in:
parent
d435889776
commit
7bfe564aab
1 changed files with 2 additions and 2 deletions
|
@ -450,13 +450,13 @@ def _get_files_diff(orig_file, new_file, as_string=False, skip_header=True):
|
|||
|
||||
"""
|
||||
|
||||
if os.path.exists(orig_file):
|
||||
if orig_file and os.path.exists(orig_file):
|
||||
with open(orig_file, 'r') as orig_file:
|
||||
orig_file = orig_file.readlines()
|
||||
else:
|
||||
orig_file = []
|
||||
|
||||
if os.path.exists(new_file):
|
||||
if new_file and os.path.exists(new_file):
|
||||
with open(new_file, 'r') as new_file:
|
||||
new_file = new_file.readlines()
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue