mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-19 10:27:07 +01:00
Fix check files for merge
This commit is contained in:
parent
c287818a9c
commit
e4dcbbcbc2
1 changed files with 4 additions and 2 deletions
|
@ -207,8 +207,10 @@ class NewConfig(object):
|
|||
def merge(self, n):
|
||||
"""Merge new file into old
|
||||
"""
|
||||
old = Utils().read_file(n[:-4]).splitlines()
|
||||
new = Utils().read_file(n).splitlines()
|
||||
if os.path.isfile(n[:-4]):
|
||||
old = Utils().read_file(n[:-4]).splitlines()
|
||||
if os.path.isfile(n):
|
||||
new = Utils().read_file(n).splitlines()
|
||||
with open(n[:-4], "w") as out:
|
||||
for l1, l2 in itertools.izip_longest(old, new):
|
||||
if l1 is None:
|
||||
|
|
Loading…
Reference in a new issue