Skip to content

Commit c72c085

Browse files
authored
Merge pull request #77 from fosslight/develop
Fix bug where relpath is printed differently in yaml
2 parents 97213dc + 4d2702d commit c72c085

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/fosslight_util/parsing_yaml.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,10 @@ def parsing_yml(yaml_file, base_path):
2525
path_of_yml = os.path.normpath(os.path.dirname(yaml_file))
2626
base_normpath = os.path.normpath(base_path)
2727
relative_path = ""
28-
2928
if path_of_yml != base_normpath:
3029
relative_path = os.path.relpath(path_of_yml, base_normpath)
3130
else:
32-
if base_normpath == ".":
33-
base_normpath = ""
34-
relative_path = base_normpath if base_path else base_path
35-
31+
relative_path = ""
3632
doc = yaml.safe_load(codecs.open(yaml_file, "r", "utf-8"))
3733
is_old_format = any(x in doc for x in OLD_YAML_ROOT_ELEMENT)
3834

0 commit comments

Comments
 (0)