Skip to content

Commit

Permalink
Merge pull request #28 from aishahalim/fixNilCheck
Browse files Browse the repository at this point in the history
reading persistent_storage may return a nil object so updated the check ...
  • Loading branch information
kusnier committed Nov 15, 2014
2 parents 0c0e076 + 0627354 commit a163e25
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -25,7 +25,7 @@ def attach_storage(location)

def detach_storage(location)
persistent_storage = read_persistent_storage()
if location and persistent_storage != "none" and identical_files(persistent_storage, location)
if location and persistent_storage and persistent_storage != "none" and identical_files(persistent_storage, location)
execute("storageattach", @uuid, "--storagectl", get_controller_name, "--port", "1", "--device", "0", "--type", "hdd", "--medium", "none")
end
end
Expand Down

0 comments on commit a163e25

Please sign in to comment.