Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoveran committed Aug 16, 2023
1 parent 584d28e commit bfe001b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fastargs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,12 @@ def get_section(self, section):
result = {}
section = tuple(section.split('.'))
for path in self.entries.keys():
for i in range(len(section)):
i = 0
while i < len(section):
if section[i] != path[i]:
break
if i == len(section)-1:
i += 1
if i == len(section):
result['.'.join(path[i:])] = self[path]
return result

Expand Down

0 comments on commit bfe001b

Please sign in to comment.