Edit File by line
•
/
home
/
barbar84
/
public_h...
/
wp-conte...
/
plugins
/
sujqvwi
/
ShExBy
/
shex_roo...
/
lib64
/
python2....
/
idlelib
•
File:
Delegator.py
class Delegator:
[
0
]
Fix
|
Delete
[
1
]
Fix
|
Delete
# The cache is only used to be able to change delegates!
[
2
]
Fix
|
Delete
[
3
]
Fix
|
Delete
def __init__(self, delegate=None):
[
4
]
Fix
|
Delete
self.delegate = delegate
[
5
]
Fix
|
Delete
self.__cache = set()
[
6
]
Fix
|
Delete
[
7
]
Fix
|
Delete
def __getattr__(self, name):
[
8
]
Fix
|
Delete
attr = getattr(self.delegate, name) # May raise AttributeError
[
9
]
Fix
|
Delete
setattr(self, name, attr)
[
10
]
Fix
|
Delete
self.__cache.add(name)
[
11
]
Fix
|
Delete
return attr
[
12
]
Fix
|
Delete
[
13
]
Fix
|
Delete
def resetcache(self):
[
14
]
Fix
|
Delete
for key in self.__cache:
[
15
]
Fix
|
Delete
try:
[
16
]
Fix
|
Delete
delattr(self, key)
[
17
]
Fix
|
Delete
except AttributeError:
[
18
]
Fix
|
Delete
pass
[
19
]
Fix
|
Delete
self.__cache.clear()
[
20
]
Fix
|
Delete
[
21
]
Fix
|
Delete
def setdelegate(self, delegate):
[
22
]
Fix
|
Delete
self.resetcache()
[
23
]
Fix
|
Delete
self.delegate = delegate
[
24
]
Fix
|
Delete
[
25
]
Fix
|
Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function
Edit text
Download
Information
Rename
Copy
Move
Delete
Chmod
List