Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/usr/lib/ztp/plugins/configdb-json
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ See the License for the specific language governing permissions and
limitations under the License.
'''

import sys
import os
import fcntl
import json
import os
import select
import time
import shutil
import stat
import sys
import time
import traceback
import json
from swsscommon.swsscommon import ConfigDBConnector

from ztp.Logger import logger
from ztp.ZTPLib import runCommand, getField, isString, updateActivity
from ztp.ZTPObjects import URL, DynamicURL
from ztp.ZTPSections import ConfigSection
from ztp.ZTPLib import runCommand, getField, isString, updateActivity
from ztp.Logger import logger

class ConfigDBJson:

Expand Down Expand Up @@ -226,7 +227,7 @@ class ConfigDBJson:

# Move staged config file to requested destination file
if final_dest_file is not None:
os.rename(dest_file, final_dest_file)
shutil.move(dest_file, final_dest_file)
else:
os.remove(dest_file)

Expand Down
Loading