eric6/Plugins/PluginWizardEricPlugin.py

changeset 7785
9978016560ec
parent 7780
41420f82c0ac
child 7836
2f0d208b8137
equal deleted inserted replaced
7784:3257703e10c5 7785:9978016560ec
164 .format(packagePath, str(err))) 164 .format(packagePath, str(err)))
165 return 165 return
166 packageFile = os.path.join(packagePath, "__init__.py") 166 packageFile = os.path.join(packagePath, "__init__.py")
167 if not os.path.exists(packageFile): 167 if not os.path.exists(packageFile):
168 try: 168 try:
169 f = open(packageFile, "w", encoding="utf-8") 169 with open(packageFile, "w", encoding="utf-8"):
170 f.close() 170 pass
171 except IOError as err: 171 except IOError as err:
172 E5MessageBox.critical( 172 E5MessageBox.critical(
173 self, 173 self,
174 self.tr("Create Package"), 174 self.tr("Create Package"),
175 self.tr( 175 self.tr(

eric ide

mercurial