Show More
@@ -851,13 +851,15 b' class bundlepart(object):' | |||||
851 | self._advisoryparams, self._data, self.mandatory) |
|
851 | self._advisoryparams, self._data, self.mandatory) | |
852 |
|
852 | |||
853 | # methods used to defines the part content |
|
853 | # methods used to defines the part content | |
854 | def __setdata(self, data): |
|
854 | @property | |
|
855 | def data(self): | |||
|
856 | return self._data | |||
|
857 | ||||
|
858 | @data.setter | |||
|
859 | def data(self, data): | |||
855 | if self._generated is not None: |
|
860 | if self._generated is not None: | |
856 | raise error.ReadOnlyPartError('part is being generated') |
|
861 | raise error.ReadOnlyPartError('part is being generated') | |
857 | self._data = data |
|
862 | self._data = data | |
858 | def __getdata(self): |
|
|||
859 | return self._data |
|
|||
860 | data = property(__getdata, __setdata) |
|
|||
861 |
|
863 | |||
862 | @property |
|
864 | @property | |
863 | def mandatoryparams(self): |
|
865 | def mandatoryparams(self): |
@@ -448,22 +448,22 b' class vfs(abstractvfs):' | |||||
448 | if realpath: |
|
448 | if realpath: | |
449 | base = os.path.realpath(base) |
|
449 | base = os.path.realpath(base) | |
450 | self.base = base |
|
450 | self.base = base | |
451 |
self. |
|
451 | self.mustaudit = audit | |
452 | self.createmode = None |
|
452 | self.createmode = None | |
453 | self._trustnlink = None |
|
453 | self._trustnlink = None | |
454 |
|
454 | |||
455 | def _getmustaudit(self): |
|
455 | @property | |
|
456 | def mustaudit(self): | |||
456 | return self._audit |
|
457 | return self._audit | |
457 |
|
458 | |||
458 | def _setmustaudit(self, onoff): |
|
459 | @mustaudit.setter | |
|
460 | def mustaudit(self, onoff): | |||
459 | self._audit = onoff |
|
461 | self._audit = onoff | |
460 | if onoff: |
|
462 | if onoff: | |
461 | self.audit = pathutil.pathauditor(self.base) |
|
463 | self.audit = pathutil.pathauditor(self.base) | |
462 | else: |
|
464 | else: | |
463 | self.audit = util.always |
|
465 | self.audit = util.always | |
464 |
|
466 | |||
465 | mustaudit = property(_getmustaudit, _setmustaudit) |
|
|||
466 |
|
||||
467 | @util.propertycache |
|
467 | @util.propertycache | |
468 | def _cansymlink(self): |
|
468 | def _cansymlink(self): | |
469 | return util.checklink(self.base) |
|
469 | return util.checklink(self.base) | |
@@ -561,14 +561,14 b' class auditvfs(object):' | |||||
561 | def __init__(self, vfs): |
|
561 | def __init__(self, vfs): | |
562 | self.vfs = vfs |
|
562 | self.vfs = vfs | |
563 |
|
563 | |||
564 | def _getmustaudit(self): |
|
564 | @property | |
|
565 | def mustaudit(self): | |||
565 | return self.vfs.mustaudit |
|
566 | return self.vfs.mustaudit | |
566 |
|
567 | |||
567 | def _setmustaudit(self, onoff): |
|
568 | @mustaudit.setter | |
|
569 | def mustaudit(self, onoff): | |||
568 | self.vfs.mustaudit = onoff |
|
570 | self.vfs.mustaudit = onoff | |
569 |
|
571 | |||
570 | mustaudit = property(_getmustaudit, _setmustaudit) |
|
|||
571 |
|
||||
572 | class filtervfs(abstractvfs, auditvfs): |
|
572 | class filtervfs(abstractvfs, auditvfs): | |
573 | '''Wrapper vfs for filtering filenames with a function.''' |
|
573 | '''Wrapper vfs for filtering filenames with a function.''' | |
574 |
|
574 |
General Comments 0
You need to be logged in to leave comments.
Login now