Skip to content

Fix PY3 exception handling#2519

Merged
wangxin merged 1 commit intosonic-net:masterfrom
vkuma82:py3exception_kickstart
Nov 25, 2020
Merged

Fix PY3 exception handling#2519
wangxin merged 1 commit intosonic-net:masterfrom
vkuma82:py3exception_kickstart

Conversation

@vkuma82
Copy link
Contributor

@vkuma82 vkuma82 commented Nov 11, 2020

File "/tmp/ansible_kickstart_payload_fdg57j8i/main.py", line 214
except Exception, e:
^
SyntaxError: invalid syntax

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

  File "/tmp/ansible_kickstart_payload_fdg57j8i/__main__.py", line 214
    except Exception, e:
                    ^
SyntaxError: invalid syntax
except ENotInEnabled:
result = {'kickstart_code': -5, 'changed': False, 'msg': "Not in enabled mode"}
except Exception, e:
except Exception as e:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the only issue to support py3?

can you check this pr #1771

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it's only py3 issue in that script preventing that scenario to be ran.

@wangxin wangxin merged commit b35aeb6 into sonic-net:master Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants