
class rBuildClient(object):
    def __init__(self, pluginMgr, cfg):
        self.cfg = cfg
        self.pluginMgr = pluginMgr
        for plugin in pluginMgr.plugins:
            setattr(self, plugin.__class__.__name__, plugin)

def getClient(disabledPlugins=None):
    cfg = rbuild.rBuildConfiguration(ignoreErrors=True)
    plugins = pluginloader.getPlugins(cfg, disabledPlugins)
    return rbuildClient(cfg, plugins)


from rbuild import rbuildcfg
from rbuild.internal import pluginloader

class rBuildClient(object):
    def __init__(self, pluginMgr, cfg):
        self.cfg = cfg
        self.pluginMgr = pluginMgr
        for plugin in pluginMgr.plugins:
            setattr(self, plugin.__class__.__name__, plugin)

def getClient(disabledPlugins=None, root=None):
    cfg = rbuildcfg.rBuildConfiguration(readConfigFiles=True,
                                        ignoreErrors=True, root=root)
    plugins = pluginloader.getPlugins([], cfg.pluginDirs, disabledPlugins)
    return rBuildClient(plugins, cfg)

Fix getClient bugs found by smoketest
Fix getClient bugs found by smoketest

+ 
+ from rbuild import rbuildcfg
+ from rbuild.internal import pluginloader
  
  class rBuildClient(object):
      def __init__(self, pluginMgr, cfg):
          self.cfg = cfg
          self.pluginMgr = pluginMgr
          for plugin in pluginMgr.plugins:
              setattr(self, plugin.__class__.__name__, plugin)
  
- def getClient(disabledPlugins=None):
+ def getClient(disabledPlugins=None, root=None):
-     cfg = rbuild.rBuildConfiguration(ignoreErrors=True)
+     cfg = rbuildcfg.rBuildConfiguration(readConfigFiles=True,
+                                         ignoreErrors=True, root=root)
-     plugins = pluginloader.getPlugins(cfg, disabledPlugins)
+     plugins = pluginloader.getPlugins([], cfg.pluginDirs, disabledPlugins)
-     return rbuildClient(cfg, plugins)
+     return rBuildClient(plugins, cfg)
  
Fix getClient bugs found by smoketest
## Code Before:

class rBuildClient(object):
    def __init__(self, pluginMgr, cfg):
        self.cfg = cfg
        self.pluginMgr = pluginMgr
        for plugin in pluginMgr.plugins:
            setattr(self, plugin.__class__.__name__, plugin)

def getClient(disabledPlugins=None):
    cfg = rbuild.rBuildConfiguration(ignoreErrors=True)
    plugins = pluginloader.getPlugins(cfg, disabledPlugins)
    return rbuildClient(cfg, plugins)

## Instruction:
Fix getClient bugs found by smoketest
## Code After:

from rbuild import rbuildcfg
from rbuild.internal import pluginloader

class rBuildClient(object):
    def __init__(self, pluginMgr, cfg):
        self.cfg = cfg
        self.pluginMgr = pluginMgr
        for plugin in pluginMgr.plugins:
            setattr(self, plugin.__class__.__name__, plugin)

def getClient(disabledPlugins=None, root=None):
    cfg = rbuildcfg.rBuildConfiguration(readConfigFiles=True,
                                        ignoreErrors=True, root=root)
    plugins = pluginloader.getPlugins([], cfg.pluginDirs, disabledPlugins)
    return rBuildClient(plugins, cfg)
