Skip to content

Commit

Permalink
fix: sub module conflict error
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarisW committed Nov 8, 2024
1 parent 031b84b commit b16ef28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions thriftpy2/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ def p_include(p):
path = os.path.join(include_dir, p[2])
if os.path.exists(path):
child_path = os.path.normpath(
os.path.dirname(remove_suffix(str(thrift.__name__), "_thrift").replace(".", "/")) + "/" + p[2])
os.path.dirname(remove_suffix(str(thrift.__name__), "_thrift").replace(".", os.sep)) + os.sep + p[2])

child_path = child_path.lstrip("/")
child_path = child_path.lstrip(os.sep)

child_module_name = str(
child_path).replace("/",
child_path).replace(os.sep,
".").replace(
".thrift", "_thrift")

Expand Down

0 comments on commit b16ef28

Please sign in to comment.