Skip to content

Commit

Permalink
make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jun 4, 2015
1 parent 9f54851 commit a6489c0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/include/bootloader/routines/lib_iface.rb
Expand Up @@ -40,14 +40,14 @@ def initialize_bootloader_routines_lib_iface(_include_target)
class TmpYAMLFile
attr_reader :path

def self.open(data=nil, &block)
def self.open(data = nil, &block)
file = new(data)
block.call(file)
ensure
file.unlink if file
end

def initialize(data=nil)
def initialize(data = nil)
@path = mktemp
write_data(data) unless data.nil?
end
Expand Down Expand Up @@ -169,12 +169,11 @@ def SetSections(sections)
# Get boot loader sections
# @return a list of all loader sections (as maps)
def GetSections

TmpYAMLFile.open do |sections_data|
Builtins.y2milestone("Reading bootloader sections")
run_pbl_yaml "#{sections_data.path}=GetSections()"
sects = sections_data.data
if sects == nil
if sects.nil?
Builtins.y2error("Reading sections failed")
return []
end
Expand Down Expand Up @@ -348,7 +347,6 @@ def InitializeBootloader
def GetFilesContents
Builtins.y2milestone("Getting contents of files")
TmpYAMLFile.open do |ret_data|

run_pbl_yaml "#{ret_data.path}=GetFilesContents()"

ret = ret_data.data
Expand Down

0 comments on commit a6489c0

Please sign in to comment.