check if dir exists
@@ -265,6 +265,7 @@ def restore_state(workspaceId):
shutil.move(etc_backup_path, etc_final_path)
# now ensure the permissions and ownership is set recursively
+ if (os.path.isdir(etc_final_path)):
uid = pwd.getpwnam(AgentUser).pw_uid
gid = grp.getgrnam(AgentGroup).gr_gid
os.chmod(etc_final_path, 750)
