You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fname = "interfaces." + dev.device_id
old_fname = "interfaces." + dev.device_id + ".old"
# copy the original file
device.applog.info("Getting the original interface file")
await device.scp(old_fname, "/etc/network/interfaces", remote_to_local=True, sudo=True)
# copy the original file.
> shutil.copy(fname, old_fname)
/usr/local/lib/python3.10/dist-packages/dent_os_testbed/test/test_suite/basic_triggers/test_interfaces_relaod.py:54:
src = 'interfaces.infra1', dst = 'interfaces.infra1.old'
def copyfile(src, dst, *, follow_symlinks=True):
"""Copy data from src to dst in the most efficient way possible.
If follow_symlinks is not set and src is a symbolic link, a new
symlink will be created instead of copying the file it points to.
"""
sys.audit("shutil.copyfile", src, dst)
if _samefile(src, dst):
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
file_size = 0
for i, fn in enumerate([src, dst]):
try:
st = _stat(fn)
except OSError:
# File most likely does not exist
pass
else:
# XXX What about other special files? (sockets, devices...)
if stat.S_ISFIFO(st.st_mode):
fn = fn.path if isinstance(fn, os.DirEntry) else fn
raise SpecialFileError("`%s` is a named pipe" % fn)
if _WINDOWS and i == 0:
file_size = st.st_size
if not follow_symlinks and _islink(src):
os.symlink(os.readlink(src), dst)
else:
> with open(src, 'rb') as fsrc:
E FileNotFoundError: [Errno 2] No such file or directory: 'interfaces.infra1'
The text was updated successfully, but these errors were encountered:
TC: basic_triggers/test_interfaces_relaod.py::test_reload_interface
The text was updated successfully, but these errors were encountered: