ProjectDjango/Project.py

changeset 167
09aa216b3046
parent 165
80afe6639c6c
child 168
c6182aab51e9
equal deleted inserted replaced
166:cf91cf549b93 167:09aa216b3046
1208 f.write(' <div id="container">') 1208 f.write(' <div id="container">')
1209 f.write(' </div>') 1209 f.write(' </div>')
1210 f.write(' </body>\n') 1210 f.write(' </body>\n')
1211 f.close() 1211 f.close()
1212 f.write('</html>\n') 1212 f.write('</html>\n')
1213 except (IOError, OSError) as e: 1213 except OSError as e:
1214 E5MessageBox.critical( 1214 E5MessageBox.critical(
1215 self.__ui, 1215 self.__ui,
1216 self.tr("New Form"), 1216 self.tr("New Form"),
1217 self.tr("<p>The new form file <b>{0}</b> could not be" 1217 self.tr("<p>The new form file <b>{0}</b> could not be"
1218 " created.<br> Problem: {1}</p>") 1218 " created.<br> Problem: {1}</p>")
1294 fullCmds = self.__getExecutablePaths(cmd) 1294 fullCmds = self.__getExecutablePaths(cmd)
1295 for fullCmd in fullCmds: 1295 for fullCmd in fullCmds:
1296 try: 1296 try:
1297 with open(fullCmd, 'r', encoding='utf-8') as f: 1297 with open(fullCmd, 'r', encoding='utf-8') as f:
1298 l0 = f.readline() 1298 l0 = f.readline()
1299 except (IOError, OSError): 1299 except OSError:
1300 l0 = "" 1300 l0 = ""
1301 if self.__isSuitableForVariant(variant, l0): 1301 if self.__isSuitableForVariant(variant, l0):
1302 variants.append(variant) 1302 variants.append(variant)
1303 break 1303 break
1304 1304

eric ide

mercurial