Skip to content

Commit

Permalink
Fix python function error
Browse files Browse the repository at this point in the history
  • Loading branch information
xumia committed Jul 10, 2020
1 parent b10af37 commit db0a9d2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ function reboot_pre_check()
fi
# Verify the next image by sonic_installer
local message=$(sonic_installer verify-next-image 2>&1)
local message=$(sonic_installer verify_next_image 2>&1)
if [ $? -ne 0 ]; then
debug "Failed to verify next image by running command: sonic_installer verify-next-image, result message: ${message}"
debug "Failed to verify next image by running command: sonic_installer verify_next_image, result message: ${message}"
exit ${EXIT_SONIC_INSTALLER_VERIFY_REBOOT}
fi
Expand Down
4 changes: 2 additions & 2 deletions scripts/reboot
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ function reboot_pre_check()
rm ${filename}

# Verify the next image by sonic_installer
local message=$(sonic_installer verify-next-image 2>&1)
local message=$(sonic_installer verify_next_image 2>&1)
if [ $? -ne 0 ]; then
VERBOSE=yes debug "Failed to verify the next image by running command: sonic_installer verify-next-image, result message: ${message}"
VERBOSE=yes debug "Failed to verify the next image by running command: sonic_installer verify_next_image, result message: ${message}"
exit ${EXIT_SONIC_INSTALLER_VERIFY_REBOOT}
fi
}
Expand Down
4 changes: 2 additions & 2 deletions sonic_installer/bootloader/aboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ def verify_binary_image(self, image_path):
except subprocess.CalledProcessError:
return False

def verify-next-image(self):
if not super(AbootBootloader, self).verify-next-image():
def verify_next_image(self):
if not super(AbootBootloader, self).verify_next_image():
return False
image = self.get_next_image()
image_path = os.path.join(self.get_image_path(image), DEFAULT_SWI_IMAGE)
Expand Down
2 changes: 1 addition & 1 deletion sonic_installer/bootloader/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def verify_binary_image(self, image_path):
"""verify that the image is supported by the bootloader"""
raise NotImplementedError

def verify-next-image(self):
def verify_next_image(self):
"""verify the next image for reboot"""
image = self.get_next_image()
image_path = self.get_image_path(image)
Expand Down
4 changes: 2 additions & 2 deletions sonic_installer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,11 @@ def rollback_docker(container_name):
click.echo('Done')

# verify the next image
@cli.command('verify-next-image')
@cli.command('verify_next_image')
def verify_reboot():
""" Verify the next image for reboot"""
bootloader = get_bootloader()
if not bootloader.verify-next-image():
if not bootloader.verify_next_image():
click.echo('Failed')
sys.exit(1)
click.echo('Done')
Expand Down

0 comments on commit db0a9d2

Please sign in to comment.