Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/NVDAObjects/IAccessible/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def __init__(self,windowHandle=None,IAccessibleObject=None,IAccessibleChildID=No
try:
left,top,width,height = IAccessibleObject.accLocation(0)
windowHandle=winUser.user32.WindowFromPoint(winUser.POINT(left,top))
except COMError, e:
except COMError as e:
log.debugWarning("accLocation failed: %s" % e)
if not windowHandle:
raise InvalidNVDAObject("Can't get a window handle from IAccessible")
Expand Down
2 changes: 1 addition & 1 deletion source/NVDAObjects/IAccessible/adobeFlash.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _getStoryText(self):
def _getRawSelectionOffsets(self):
try:
return self.obj.ISimpleTextSelectionObject.GetSelection()
except COMError, e:
except COMError as e:
if e.hresult == hresult.E_FAIL:
# The documentation says that an empty field should return 0 for both values, but instead, we seem to get E_FAIL.
# An empty field still has a valid caret.
Expand Down
2 changes: 1 addition & 1 deletion source/gui/logViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def onSaveAsCommand(self, evt):
# #9038: work with UTF-8 from the start.
with open(filename, "w", encoding="UTF-8") as f:
f.write(self.outputCtrl.GetValue())
except (IOError, OSError), e:
except (IOError, OSError) as e:
# Translators: Dialog text presented when NVDA cannot save a log file.
gui.messageBox(_("Error saving log: %s") % e.strerror, _("Error"), style=wx.OK | wx.ICON_ERROR, parent=self)

Expand Down
2 changes: 1 addition & 1 deletion source/inputCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def load(self, filename):
self.fileName = filename
try:
conf = configobj.ConfigObj(filename, file_error=True, encoding="UTF-8")
except (configobj.ConfigObjError,UnicodeDecodeError), e:
except (configobj.ConfigObjError,UnicodeDecodeError) as e:
log.warning("Error in gesture map '%s': %s"%(filename, e))
self.lastUpdateContainedError = True
return
Expand Down
2 changes: 1 addition & 1 deletion source/nvda_slave.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def main():
except installer.RetriableFailure:
logHandler.log.error("Task failed, try again",exc_info=True)
sys.exit(2)
except Exception, e:
except Exception as e:
logHandler.log.error("slave error",exc_info=True)
sys.exit(1)

Expand Down
2 changes: 1 addition & 1 deletion source/nvwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _feedUnbuffered(self, data, onDone=None):
try:
with self._global_waveout_lock:
winmm.waveOutWrite(self._waveout, LPWAVEHDR(whdr), sizeof(WAVEHDR))
except WindowsError, e:
except WindowsError as e:
self.close()
raise e
self.sync()
Expand Down