Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

pennyworth import-base-image breaks if local import-state.yml is empty #9

Open
greygoo opened this issue Sep 2, 2014 · 0 comments
Open

Comments

@greygoo
Copy link
Member

greygoo commented Sep 2, 2014

Description:

running
pennyworth import-base-image --url http://machintegration.suse.de/machinery-internal/
failed with

-----------snip----------
undefined method []' for false:FalseClass /usr/src/chuller/pennyworth/lib/cli.rb:109:inexit'
/usr/src/chuller/pennyworth/lib/cli.rb:109:in rescue in import_base' /usr/src/chuller/pennyworth/lib/cli.rb:84:inimport_base'
/usr/lib64/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' /usr/lib64/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command'
/usr/lib64/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' /usr/lib64/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:instart'
/usr/src/chuller/pennyworth/bin/pennyworth:61:in <top (required)>' /usr/lib64/ruby/gems/2.0.0/gems/debugger-1.6.8/bin/rdebug:124:indebug_load'
/usr/lib64/ruby/gems/2.0.0/gems/debugger-1.6.8/bin/rdebug:124:in debug_program' /usr/lib64/ruby/gems/2.0.0/gems/debugger-1.6.8/bin/rdebug:394:in<top (required)>'
/usr/bin/rdebug2.0:23:in load' /usr/bin/rdebug2.0:23:in

'
Uncaught exception: exit
-----------snip----------

Upon debugging and further inspection it turned out that the local import-state.yml file was just an empty file which triggered this problem.

Removing the local import-state.yml worked around the problem, but we should check if that file is empty before reading and processing it further.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant