power: update power_status to ignore peripheral battery

Adding an if statement to check that the battery is not a
peripheral battery.

BUG=chromium:774940, chromium:752662
TEST=test_that power_Status

Change-Id: I2aeb419bdf1086d3de41a24a44d18313c2875bc2
Reviewed-on: https://chromium-review.googlesource.com/607531
Commit-Ready: Mengqi Guo <mqg@chromium.org>
Tested-by: Mengqi Guo <mqg@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
(cherry picked from commit d969cb04e6fec332e3908094741fc2b8a6feb002)
Reviewed-on: https://chromium-review.googlesource.com/727830
Reviewed-by: Kuang-che Wu <kcwu@chromium.org>
Commit-Queue: Pin-chih Lin <johnylin@chromium.org>
Tested-by: Pin-chih Lin <johnylin@chromium.org>
Trybot-Ready: Pin-chih Lin <johnylin@chromium.org>
diff --git a/client/cros/power_status.py b/client/cros/power_status.py
index 17ab79e..b77ec0b 100644
--- a/client/cros/power_status.py
+++ b/client/cros/power_status.py
@@ -407,6 +407,10 @@
                 continue
             power_type = utils.read_one_line(type_path)
             if power_type == 'Battery':
+                scope_path = os.path.join(path,'scope')
+                if (os.path.exists(scope_path) and
+                        utils.read_one_line(scope_path) == 'Device'):
+                    continue
                 self.battery_path = path
             elif power_type in self.psu_types:
                 self.linepower_path.append(path)