61 |
61 |
62 This method checks, if an operation is permitted according to |
62 This method checks, if an operation is permitted according to |
63 the mode of the file. If it is not, an IOError is raised. |
63 the mode of the file. If it is not, an IOError is raised. |
64 |
64 |
65 @param mode the mode to be checked (string) |
65 @param mode the mode to be checked (string) |
|
66 @exception IOError raised to indicate a bad file descriptor |
66 """ |
67 """ |
67 if mode != self.mode: |
68 if mode != self.mode: |
68 raise IOError((9, '[Errno 9] Bad file descriptor')) |
69 raise IOError((9, '[Errno 9] Bad file descriptor')) |
69 |
70 |
70 def __nWrite(self, n): |
71 def __nWrite(self, n): |