rel path handling

This commit is contained in:
Robin Mueller 2022-03-04 10:37:30 +01:00
parent 330db88249
commit 5c8895b631
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import os.path
import re
import sys
from typing import List, Tuple
from typing import List, Tuple, Optional
from fsfwgen.parserbase.parser import FileParser, VerbosityLevels
from fsfwgen.utility.printer import PrettyPrinter
@ -172,6 +173,7 @@ class ReturnValueParser(FileParser):
self.count = 0
# Stores last three lines
self.last_lines = ["", "", ""]
self.obsw_root_path: Optional[str] = None
self.current_interface_id_entries = {"Name": "", "ID": 0, "FullName": ""}
self.return_value_dict.update(
{
@ -359,6 +361,8 @@ class ReturnValueParser(FileParser):
# print('Duplicate returncode ' + hex(full_id) + ' from ' + file_name +
# ' was already in ' + self.return_value_dict[full_id][3])
pass
if self.obsw_root_path is not None:
file_name = os.path.relpath(file_name, self.obsw_root_path)
dict_tuple = (
string_to_add,
description,