-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fix issue with pathless config items #785
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #785 +/- ##
==========================================
- Coverage 75.56% 75.55% -0.01%
==========================================
Files 299 299
Lines 25782 25784 +2
==========================================
+ Hits 19481 19482 +1
- Misses 6301 6302 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
027237a
to
deb58c5
Compare
alternatively you can just pass |
Co-authored-by: Erik Schamper <[email protected]>
Co-authored-by: Erik Schamper <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also first rebase and fix the conflicts.
|
||
if isinstance(config_object, ConfigurationEntry): | ||
path = Path(entry) / Path(item) | ||
yield from self._sub(config_object, path, orig_path=path, pattern=pattern) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orig_path
will not contain the root. aka, /etc
. I think it might be a good idea to add that to it.
config_object = self.get(str(Path(entry) / Path(item))) | ||
yield from self._sub(config_object, Path(entry) / Path(item), pattern) | ||
|
||
if isinstance(config_object, ConfigurationEntry): | ||
path = Path(entry) / Path(item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path = Path(entry) / item
config_object = self.get(str(path))
No description provided.