=== modified file 'PyRoom/basic_edit.py' --- PyRoom/basic_edit.py 2010-09-01 15:39:02 +0000 +++ PyRoom/basic_edit.py 2011-09-17 12:37:59 +0000 @@ -26,6 +26,7 @@ """ import gtk +from errno import ENOENT, EACCES import os import urllib @@ -568,10 +569,10 @@ errortext = _('Unable to open %(filename)s.') % { 'filename': filename_to_open } - if errno == 13: + if errno == EACCES: errortext += _(' You do not have permission to open \ the file.') - if not errno == 2: + if not errno == ENOENT: raise PyroomError(errortext) except: raise PyroomError(_('Unable to open %s\n') % filename_to_open) @@ -608,7 +609,7 @@ except IOError, (errno, strerror): errortext = _('Unable to save %(filename)s.') % { 'filename': buf.filename} - if errno == 13: + if errno == EACCES: errortext += _(' You do not have permission to write to \ the file.') raise PyroomError(errortext)