From f8dcc8c99749ffd0a31370e99442ed79f289be61 Mon Sep 17 00:00:00 2001 From: "Randy D. Wallace Jr" Date: Fri, 6 Sep 2013 13:10:50 +0000 Subject: [PATCH] minor fix --- app/models/container.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/container.rb b/app/models/container.rb index 4806d1e..f6dc518 100644 --- a/app/models/container.rb +++ b/app/models/container.rb @@ -71,8 +71,11 @@ def ip def users users = [] - File.open(File.join(root_path, 'rootfs', 'etc', 'passwd')).each_line do |line| - users << line.split(':') + f = File.join(root_path, 'rootfs', 'etc', 'passwd') + if File.exists?(f) + File.open(f).each_line do |line| + users << line.split(':') + end end users end