Add missing import for difflib unified_diff

This commit is contained in:
Joshua Boniface 2023-08-27 14:40:52 -04:00
parent 4898ae5082
commit b968110e9f
1 changed files with 5 additions and 4 deletions

View File

@ -19,6 +19,8 @@
# #
############################################################################### ###############################################################################
from colorama import Fore
from difflib import unified_diff
from functools import wraps from functools import wraps
from json import dump as jdump from json import dump as jdump
from json import dumps as jdumps from json import dumps as jdumps
@ -29,7 +31,6 @@ from lxml.etree import fromstring, tostring
from re import sub from re import sub
from yaml import load as yload from yaml import load as yload
from yaml import SafeLoader as SafeYAMLLoader from yaml import SafeLoader as SafeYAMLLoader
from colorama import Fore
from pvc.cli.helpers import * from pvc.cli.helpers import *
from pvc.cli.waiters import * from pvc.cli.waiters import *
@ -1219,7 +1220,7 @@ def cli_vm_modify(
echo(CLI_CONFIG, "Pending modifications:") echo(CLI_CONFIG, "Pending modifications:")
echo(CLI_CONFIG, "") echo(CLI_CONFIG, "")
diff = list( diff = list(
difflib.unified_diff( unified_diff(
current_vm_cfgfile.split("\n"), current_vm_cfgfile.split("\n"),
new_vm_cfgfile.split("\n"), new_vm_cfgfile.split("\n"),
fromfile="current", fromfile="current",
@ -4571,7 +4572,7 @@ def cli_provisioner_userdata_modify(name, filename, editor):
echo(CLI_CONFIG, "Pending modifications:") echo(CLI_CONFIG, "Pending modifications:")
echo(CLI_CONFIG, "") echo(CLI_CONFIG, "")
diff = list( diff = list(
difflib.unified_diff( unified_diff(
current_userdata.split("\n"), current_userdata.split("\n"),
new_userdata.split("\n"), new_userdata.split("\n"),
fromfile="current", fromfile="current",
@ -4759,7 +4760,7 @@ def cli_provisioner_script_modify(name, filename, editor):
echo(CLI_CONFIG, "Pending modifications:") echo(CLI_CONFIG, "Pending modifications:")
echo(CLI_CONFIG, "") echo(CLI_CONFIG, "")
diff = list( diff = list(
difflib.unified_diff( unified_diff(
current_script.split("\n"), current_script.split("\n"),
new_script.split("\n"), new_script.split("\n"),
fromfile="current", fromfile="current",