(self, fname)
| 673 | self.val = s |
| 674 | |
| 675 | def _validate_writable_file(self, fname): |
| 676 | if os.path.exists(fname): |
| 677 | if os.path.isfile(fname): |
| 678 | if not os.access(fname, os.W_OK): |
| 679 | raise ArgumentValid('{0} is not writable'.format(fname)) |
| 680 | else: |
| 681 | raise ArgumentValid('{0} is not file'.format(fname)) |
| 682 | else: |
| 683 | dirname = os.path.dirname(fname) |
| 684 | if not os.access(dirname, os.W_OK): |
| 685 | raise ArgumentValid('cannot create file in {0}'.format(dirname)) |
| 686 | |
| 687 | def __str__(self): |
| 688 | return '<outfilename>' |
no test coverage detected