From 7bfe564aab2300172b6aad68656dddbdd8933a27 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 25 Jun 2020 10:53:08 +0200 Subject: [PATCH] fix get_files_diff if {orig,new}_file is None --- src/yunohost/regenconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yunohost/regenconf.py b/src/yunohost/regenconf.py index 6445248bd..a94f5023d 100644 --- a/src/yunohost/regenconf.py +++ b/src/yunohost/regenconf.py @@ -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: