VirtualBox

Changeset 21730 in vbox for trunk/src/VBox/Main/glue


Ignore:
Timestamp:
Jul 20, 2009 4:48:08 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50303
Message:

SDK: make documentation match reality, minor refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/vboxapi.py

    r21727 r21730  
    2525
    2626if VboxSdkDir is None:
    27     VboxSdkDir = VboxBinDir+"/sdk"
     27    VboxSdkDir = os.path.join(VboxBinDir,"sdk")
    2828
    2929os.environ["VBOX_PROGRAM_PATH"] = VboxBinDir
     
    378378class PlatformWEBSERVICE:
    379379    def __init__(self, params):
    380         sys.path.append(VboxSdkDir+'/bindings/webservice/python/lib')
     380        sys.path.append(os.path.join(VboxSdkDir,'bindings', 'webservice', 'python', 'lib'))
    381381        # not really needed, but just fail early if misconfigured
    382382        import VirtualBox_services
    383383        import VirtualBox_wrappers
    384384        from VirtualBox_wrappers import IWebsessionManager2
     385
    385386        if params is not None:
    386387            self.user = params.get("user", "")
     
    472473            else:
    473474                style = "XPCOM"
     475       
     476        exec "self.platform = Platform"+style+"(platparams)"
     477           
     478        self.constants = VirtualBoxReflectionInfo()
     479        self.type = self.platform.getType()
     480        self.remote = self.platform.getRemote()
     481        self.style = style
     482        self.mgr = SessionManager(self)
     483       
    474484        try:
    475             exec "self.platform = Platform"+style+"(platparams)"
    476            
    477             self.constants = VirtualBoxReflectionInfo()
    478             self.type = self.platform.getType()
    479             self.remote = self.platform.getRemote()
    480             self.style = style           
    481 
    482             self.mgr = SessionManager(self)
    483485            self.vbox = self.platform.getVirtualBox()
     486        except NameError,ne:
     487            print "Installation problem: check that appropriate libs in place"
     488            traceback.print_exc()
     489            raise ne
    484490        except Exception,e:
    485491            print "init exception: ",e
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette