servo: Make dut-power read SERVOD_PORT just like dut-control

BUG=none
TEST=dut-power --port 9002; SERVOD_PORT=9002 dut-power; dut-power
Made sure it connected correctly.

Change-Id: I5bc3d8cff3a3bfb10addf42174c40081fca26e85
Reviewed-on: https://chromium-review.googlesource.com/1258592
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
diff --git a/servo/dut_power.py b/servo/dut_power.py
index ea387ae..a966b4f 100755
--- a/servo/dut_power.py
+++ b/servo/dut_power.py
@@ -115,10 +115,11 @@
   # Save all logic
   if args.save_all:
     args.save_logs = args.save_raw_data = args.save_summary = True
-  if not args.port:
-    args.port = client.DEFAULT_PORT
   pm_logger = logging.getLogger('')
   pm_logger.setLevel(logging.DEBUG)
+  servo_parsing.get_env_options(pm_logger, args)
+  if not args.port:
+    args.port = client.DEFAULT_PORT
   stdout_handler = logging.StreamHandler(sys.stdout)
   stdout_handler.setLevel(logging.INFO)
   if args.debug:
diff --git a/servo/servo_parsing.py b/servo/servo_parsing.py
index 830bbd4..3ceffd4 100644
--- a/servo/servo_parsing.py
+++ b/servo/servo_parsing.py
@@ -180,5 +180,5 @@
         options.port = int(env_port)
       except ValueError:
         logger.warning('Ignoring environment port definition "%s"', env_port)
-  if not options.name:
+  if hasattr(options, 'name') and not options.name:
     options.name = os.getenv('SERVOD_NAME')