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-ycabled]: Fix swsscommon import protobuf error #407

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sonic-ycabled/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
import distutils.command
import os.path
import sys
# The shared library of protobuf will be used in the swsscommon
# So, when we execute python setup.py test, the protobuf.so will be
# imported twice simultaneously in `GrpcTool run` and
# `test_y_cable_helper.py: from swsscommon import swsscommon`,
# The initialization of some global variables in protobuf.so will be conflicted
# so that raises an import error.
# To avoid this issue, we need to explicitly import swsscommon before
# above two steps.
from swsscommon import swsscommon


class GrpcTool(distutils.cmd.Command):
def initialize_options(self):
Expand Down
Loading