7825:3e7d767119a9 | 7850:e64b178499da |
---|---|
1497 "%Y-%m-%d %H:%M:%S") | 1497 "%Y-%m-%d %H:%M:%S") |
1498 installInfo["sudo"] = not os.access( | 1498 installInfo["sudo"] = not os.access( |
1499 installInfo["eric"], os.W_OK) | 1499 installInfo["eric"], os.W_OK) |
1500 with open(installInfoFile, "w") as infoFile: | 1500 with open(installInfoFile, "w") as infoFile: |
1501 json.dump(installInfo, infoFile, indent=2) | 1501 json.dump(installInfo, infoFile, indent=2) |
1502 except EnvironmentError: | 1502 except OSError: |
1503 # ignore this | 1503 # ignore this |
1504 pass | 1504 pass |
1505 else: | 1505 else: |
1506 changed = False | 1506 changed = False |
1507 with open(installInfoFile, "r") as infoFile: | 1507 with open(installInfoFile, "r") as infoFile: |
5005 self.tr( | 5005 self.tr( |
5006 '<p>The file <b>{0}</b> does not exist or' | 5006 '<p>The file <b>{0}</b> does not exist or' |
5007 ' is zero length.</p>') | 5007 ' is zero length.</p>') |
5008 .format(fn)) | 5008 .format(fn)) |
5009 return | 5009 return |
5010 except EnvironmentError: | 5010 except OSError: |
5011 E5MessageBox.critical( | 5011 E5MessageBox.critical( |
5012 self, | 5012 self, |
5013 self.tr('Problem'), | 5013 self.tr('Problem'), |
5014 self.tr( | 5014 self.tr( |
5015 '<p>The file <b>{0}</b> does not exist or' | 5015 '<p>The file <b>{0}</b> does not exist or' |
5075 self.tr( | 5075 self.tr( |
5076 '<p>The file <b>{0}</b> does not exist or' | 5076 '<p>The file <b>{0}</b> does not exist or' |
5077 ' is zero length.</p>') | 5077 ' is zero length.</p>') |
5078 .format(fn)) | 5078 .format(fn)) |
5079 return | 5079 return |
5080 except EnvironmentError: | 5080 except OSError: |
5081 E5MessageBox.critical( | 5081 E5MessageBox.critical( |
5082 self, | 5082 self, |
5083 self.tr('Problem'), | 5083 self.tr('Problem'), |
5084 self.tr( | 5084 self.tr( |
5085 '<p>The file <b>{0}</b> does not exist or' | 5085 '<p>The file <b>{0}</b> does not exist or' |
5245 self.tr( | 5245 self.tr( |
5246 '<p>The file <b>{0}</b> does not exist or' | 5246 '<p>The file <b>{0}</b> does not exist or' |
5247 ' is zero length.</p>') | 5247 ' is zero length.</p>') |
5248 .format(fn)) | 5248 .format(fn)) |
5249 return | 5249 return |
5250 except EnvironmentError: | 5250 except OSError: |
5251 E5MessageBox.critical( | 5251 E5MessageBox.critical( |
5252 self, | 5252 self, |
5253 self.tr('Problem'), | 5253 self.tr('Problem'), |
5254 self.tr( | 5254 self.tr( |
5255 '<p>The file <b>{0}</b> does not exist or' | 5255 '<p>The file <b>{0}</b> does not exist or' |
5301 self.tr( | 5301 self.tr( |
5302 '<p>The file <b>{0}</b> does not exist or' | 5302 '<p>The file <b>{0}</b> does not exist or' |
5303 ' is zero length.</p>') | 5303 ' is zero length.</p>') |
5304 .format(fn)) | 5304 .format(fn)) |
5305 return | 5305 return |
5306 except EnvironmentError: | 5306 except OSError: |
5307 if not ignore: | 5307 if not ignore: |
5308 E5MessageBox.critical( | 5308 E5MessageBox.critical( |
5309 self, | 5309 self, |
5310 self.tr('Problem'), | 5310 self.tr('Problem'), |
5311 self.tr( | 5311 self.tr( |