eric6/PluginManager/PluginInstallDialog.py

changeset 8259
2bbec88047dd
parent 8243
cc717c2ae956
child 8292
54b48d756b0a
equal deleted inserted replaced
8258:82b608e352ec 8259:2bbec88047dd
561 561
562 @param destination name of the plugin directory (string) 562 @param destination name of the plugin directory (string)
563 @param pluginFileName name of the plugin file (string) 563 @param pluginFileName name of the plugin file (string)
564 @param packageName name of the plugin package (string) 564 @param packageName name of the plugin package (string)
565 """ 565 """
566 if packageName in ("", "None"): 566 packageDir = (
567 packageDir = None 567 None
568 else: 568 if packageName in ("", "None") else
569 packageDir = os.path.join(destination, packageName) 569 os.path.join(destination, packageName)
570 )
570 pluginFile = os.path.join(destination, pluginFileName) 571 pluginFile = os.path.join(destination, pluginFileName)
571 572
572 with contextlib.suppress(OSError, os.error): 573 with contextlib.suppress(OSError, os.error):
573 if packageDir and os.path.exists(packageDir): 574 if packageDir and os.path.exists(packageDir):
574 shutil.rmtree(packageDir) 575 shutil.rmtree(packageDir)

eric ide

mercurial