- Revision
- 16036
- Author
- vajda
- Date
- 2007-12-03 18:13:18 -0800 (Mon, 03 Dec 2007)
Log Message
- fixed for bug 11556 (r=bear)
(http://bugzilla.osafoundation.org/show_bug.cgi?id=11556)
(0.7.3 RC1 Chandler fails to launch with ValueError: An error occured while creating VM)
(http://bugzilla.osafoundation.org/show_bug.cgi?id=11556)
(0.7.3 RC1 Chandler fails to launch with ValueError: An error occured while creating VM)
Modified Paths
Diff
Modified: trunk/chandler/application/Application.py (16035 => 16036)
--- trunk/chandler/application/Application.py 2007-12-04 01:36:52 UTC (rev 16035) +++ trunk/chandler/application/Application.py 2007-12-04 02:13:18 UTC (rev 16036) @@ -336,6 +336,12 @@ self.ignoreSynchronizeWidget = True self.focus = None + # Check the Mac platform, will stop the program if not compatible + if not checkMacPlatform(): + wx.MessageBox(_(u'This version of Chandler runs on a different operating system. Please download the correct installer from the OSAF website.'), + _(u'Quitting Chandler')) + return False + wx.InitAllImageHandlers() # Disable automatic calling of UpdateUIEvents. We will call them @@ -347,9 +353,6 @@ Globals.wxApplication = self self.updateUIInOnIdle = True - # Check the platform, will stop the program if not compatible - checkPlatform() - # Initialize PARCELPATH and sys.path parcelPath = Utility.initParcelEnv(options, Globals.chandlerDirectory) pluginEnv, pluginEggs = Utility.initPluginEnv(options, @@ -1555,23 +1558,15 @@ wx.GetApp().Yield(True) -def checkPlatform(): +def checkMacPlatform(): """ - Check that the platforms you're running and the one the code has been compiled for match. - If they don't, the program stops with sys.exit(). + Check that we're not running the wrong Mac binaries for the Mac hardware """ - try: - from version import platform # This is the compiled platform name - except ImportError: - # If the platform is not specified in version.py, you're running a dev version from - # code. In that case, we suppose you know what you're doing so - # the test will pass and you're on your own... - platform = Utility.getPlatformName() - if Utility.getPlatformName() != platform: - # Prompt the user that we're going to exit - wx.MessageBox(_(u'This version of Chandler runs on a different operating system. Please download the correct installer from the OSAF website.'), - _(u'Quitting Chandler')) - # Stop the program. Somewhat unclean but since nothing can be done safely - # or even should be done (could crash anytime), the best is to just exit when - # we still can... - sys.exit(1) + + if sys.platform == 'darwin': + from platform import processor, machine + if processor() == 'i386' and machine() == 'Power Macintosh': + # running under Rosetta, not supported + return False + + return True
Modified: trunk/chandler/application/Utility.py (16035 => 16036)
--- trunk/chandler/application/Utility.py 2007-12-04 01:36:52 UTC (rev 16035) +++ trunk/chandler/application/Utility.py 2007-12-04 02:13:18 UTC (rev 16036) @@ -23,7 +23,6 @@ from configobj import ConfigObj from chandlerdb.util.c import UUID, loadUUIDs, Default -from repository.persistence.DBRepository import DBRepository from repository.persistence.RepositoryError import \ VersionConflictError, RepositoryPasswordError, RepositoryVersionError, \ RepositoryRunRecoveryError @@ -629,6 +628,8 @@ def initRepository(directory, options, allowSchemaView=False): + from repository.persistence.DBRepository import DBRepository + if options.uuids: input = file(options.uuids) loadUUIDs([UUID(uuid.strip()) for uuid in input if len(uuid) > 1])
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
