xbuddy: read config from default xbuddy_config.ini

If no xbuddy_config.ini is found, then read the default one stored
in devserver folder. This makes it possible to use xbuddy without
starting devserver.

TEST=Run `cros flash` which uses xbuddy directly.

Change-Id: I054eb9f164015cf42e5bef57a04bc4449dde4818
Reviewed-on: https://chromium-review.googlesource.com/228601
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Yiming Chen <yimingc@chromium.org>
Tested-by: Yiming Chen <yimingc@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
diff --git a/xbuddy.py b/xbuddy.py
index fb85a2a..936b8b1 100644
--- a/xbuddy.py
+++ b/xbuddy.py
@@ -217,7 +217,10 @@
     if os.path.exists(config_file):
-      raise XBuddyException('%s not found' % (CONFIG_FILE))
+      # Get the directory of xbuddy.py file.
+      file_dir = os.path.dirname(os.path.realpath(__file__))
+      # Read the default xbuddy_config.ini from the directory.
+      xbuddy_config.read(os.path.join(file_dir, CONFIG_FILE))
     # Read the shadow file if there is one.
     if os.path.isdir(CHROOT_SHADOW_DIR):