juju-deployer handles empty config files ungracefully
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-deployer |
Confirmed
|
Low
|
Unassigned |
Bug Description
If you run juju-deployer with an empty config file (e.g. "juju-deployer -c myconfig.cfg -c secrets.cfg" where secrets.cfg is zero bytes) it dies with a stacktrace:
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
run()
File "/usr/lib/
config = ConfigStack(
File "/usr/lib/
self.load()
File "/usr/lib/
for fp in self._resolve_
File "/usr/lib/
[files.
File "/usr/lib/
[files.
File "/usr/lib/
d = self._yaml_
File "/usr/lib/
services = yaml_result.
AttributeError: 'NoneType' object has no attribute 'get'
It really should just skip the empty file (or if it really has to, report an error), not just die.
Changed in juju-deployer: | |
status: | New → Confirmed |
importance: | Undecided → Low |
I'm not sure we'd want it to skip the empty file would we? I agree the stacktrace is a bit unfriendly, but I think it should error out telling you you're trying to pass it an empty file (which presumably you didn't want to do).