home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.6)
-
- import os
- import sys
-
- def update_and_restart(tempdir):
- import wx
- updater = os.path.join(os.getcwd(), 'mac_updater.pyc')
- Authorization = Authorization
- kAuthorizationFlagDestroyRights = kAuthorizationFlagDestroyRights
- import Authorization
- auth = Authorization(destroyflags = (kAuthorizationFlagDestroyRights,))
-
- try:
- python = sys.executable
- pipe = auth.executeWithPrivileges(python, updater, tempdir)
- output = pipe.read()
- if output.find('error') != -1:
- wx.MessageBox(_('Error while updating Digsby. Please restart and try again, or grab the latest version from digsby.com. Digsby will now shut down.'))
- pipe.close()
- wx.GetApp().ExitMainLoop()
- return None
- pipe.close()
- wx.MessageBox(_('Updated successfully. Digsby now needs to restart.'))
- os.spawnv(os.P_NOWAIT, python, [
- 'python',
- updater,
- 'restart'])
- wx.GetApp().ExitMainLoop()
- except:
- wx.MessageBox(_('Unable to authenticate. Please restart and try again.'))
-
-
-
- def platform_cleanup():
- return []
-
-