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

[sonic-installer] Import 're' module #1061

Merged
merged 1 commit into from
Aug 21, 2020
Merged

[sonic-installer] Import 're' module #1061

merged 1 commit into from
Aug 21, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Aug 21, 2020

The import re line was removed from the file in #953. However, it is still referenced in the update_sonic_environment() function. Adding it back.

Was causing the following traceback during sonic-installer install command on certain platforms:

Installed SONiC base image SONiC-OS successfully

Command: grub-set-default --boot-directory=/host 0

Command: config-setup backup
Taking backup of curent configuration

Traceback (most recent call last):
  File "/usr/bin/sonic-installer", line 12, in <module>
    sys.exit(sonic_installer())
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/sonic_installer/main.py", line 329, in install
    update_sonic_environment(click, binary_image_version)
  File "/usr/lib/python2.7/dist-packages/sonic_installer/main.py", line 230, in update_sonic_environment
    sonic_version = re.sub("SONiC-OS-", '', binary_image_version)
NameError: global name 're' is not defined

@lguohan
Copy link
Contributor

lguohan commented Aug 21, 2020

we need unit for sonic-installer. currently it is zero.

@lguohan lguohan merged commit 17fb378 into sonic-net:master Aug 21, 2020
@jleveque jleveque deleted the fix_installer branch August 21, 2020 06:50
@jleveque
Copy link
Contributor Author

we need unit for sonic-installer. currently it is zero.

On my TODO list. I opened an issue last month to track: #996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants