Hi Lars,

Thanks for taking the time to do this, this looks like a good improvement.

Some tests for this would be good, to ensure that we don't regress here[0].  
TestGenericDistro in tests/unittests/test_distros/test_generic.py already has 
the means to do filesystem mocking in place, so it shouldn't be too painful.


Dan


[0] If I weren't looking at the code too carefully, I'd replace what you've 
written with os.path.isdir; but that would be incorrect because it follows 
symbolic links.  Having something that makes us notice if someone does this 
would be valuable.
-- 
https://code.launchpad.net/~larsks/cloud-init/fix-systemd-detection/+merge/260885
Your team cloud init development team is requested to review the proposed merge 
of lp:~larsks/cloud-init/fix-systemd-detection into lp:cloud-init.

_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to