Something wrong with the python code
This commit is contained in:
parent
abfcbe4a4e
commit
b3803637ba
|
@ -72,9 +72,16 @@ class InstallerAppDelegate(NSObject):
|
|||
|
||||
packagePath = NSBundle.mainBundle().pathForResource_ofType_("McBopomofo", "app")
|
||||
McBopomofoPath = os.path.join(inputMethodDir, "McBopomofo.app")
|
||||
WrongPath = os.path.join(McBopomofoPath, "McBopomofo.app")
|
||||
if os.path.exists(WrongPath) is True:
|
||||
try:
|
||||
shutil.rmtree(WrongPath)
|
||||
except:
|
||||
"""do nothing"""
|
||||
|
||||
if os.path.exists(McBopomofoPath) is True:
|
||||
try:
|
||||
call(["/bin/cp", "-R", packagePath, McBopomofoPath])
|
||||
call(["/bin/cp", "-R", packagePath, inputMethodDir])
|
||||
except:
|
||||
NSRunAlertPanel(NSLocalizedString("Failed to install McBopomofo!", ""),
|
||||
NSLocalizedString("Failed to overwrite existing installation.", ""),
|
||||
|
|
Loading…
Reference in New Issue