Python builtins.PermissionError() Examples
The following are 2
code examples of builtins.PermissionError().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
builtins
, or try the search function
.
Example #1
Source File: asyncioreactor.py From Safejumper-for-Desktop with GNU General Public License v2.0 | 6 votes |
def addWriter(self, writer): if writer in self._writers.keys() or \ writer in self._continuousPolling._writers: return fd = writer.fileno() try: self._asyncioEventloop.add_writer(fd, callWithLogger, writer, self._readOrWrite, writer, False) self._writers[writer] = fd except PermissionError: self._unregisterFDInAsyncio(fd) # epoll(7) doesn't support certain file descriptors, # e.g. filesystem files, so for those we just poll # continuously: self._continuousPolling.addWriter(writer) except BrokenPipeError: # The kqueuereactor will raise this if there is a broken pipe self._unregisterFDInAsyncio(fd) except: self._unregisterFDInAsyncio(fd) raise
Example #2
Source File: asyncioreactor.py From learn_python3_spider with MIT License | 6 votes |
def addWriter(self, writer): if writer in self._writers.keys() or \ writer in self._continuousPolling._writers: return fd = writer.fileno() try: self._asyncioEventloop.add_writer(fd, callWithLogger, writer, self._readOrWrite, writer, False) self._writers[writer] = fd except PermissionError: self._unregisterFDInAsyncio(fd) # epoll(7) doesn't support certain file descriptors, # e.g. filesystem files, so for those we just poll # continuously: self._continuousPolling.addWriter(writer) except BrokenPipeError: # The kqueuereactor will raise this if there is a broken pipe self._unregisterFDInAsyncio(fd) except: self._unregisterFDInAsyncio(fd) raise