mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +00:00
topotests: change from "context" to "unified" diff
context diff: *** before.py
This commit is contained in:
parent
5684f8100d
commit
91733ef85e
@ -201,7 +201,7 @@ def pid_exists(pid):
|
|||||||
def get_textdiff(text1, text2, title1="", title2=""):
|
def get_textdiff(text1, text2, title1="", title2=""):
|
||||||
"Returns empty string if same or formatted diff"
|
"Returns empty string if same or formatted diff"
|
||||||
|
|
||||||
diff = '\n'.join(difflib.context_diff(text1, text2,
|
diff = '\n'.join(difflib.unified_diff(text1, text2,
|
||||||
fromfile=title1, tofile=title2))
|
fromfile=title1, tofile=title2))
|
||||||
# Clean up line endings
|
# Clean up line endings
|
||||||
diff = os.linesep.join([s for s in diff.splitlines() if s])
|
diff = os.linesep.join([s for s in diff.splitlines() if s])
|
||||||
|
Loading…
Reference in New Issue
Block a user