Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otptool: Define value_start in rev_id path #18

Merged
merged 1 commit into from
Aug 16, 2023

Commits on Aug 16, 2023

  1. otptool: Define value_start in rev_id path

    Fixes:
    
    ```
    Traceback (most recent call last):
      File "/usr/bin/otptool", line 29, in <module>
        tool.run(sys.argv)
      File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 2127, in run
        args.func(args)
      File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 2130, in make_otp_image
        self.otp.make_otp_image(args.config,
      File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 1335, in make_otp_image
        config_region, config_region_ignore = self.make_config_region(
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 1042, in make_config_region
        offset_value = int(value, 16) - value_start
                                        ^^^^^^^^^^^
    UnboundLocalError: cannot access local variable 'value_start' where it is not associated with a value
    ```
    
    Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
    Reviewed-by: Neal Liu neal_liu@aspeedtech.com
    amboar committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    85b886a View commit details
    Browse the repository at this point in the history