1 |
On Wednesday 16 October 2013 20:02:50 Arfrever Frehtes Taifersar Arahesis |
2 |
wrote: |
3 |
> 2013-10-16 23:03 Mike Frysinger napisaĆ(a): |
4 |
> > Rather than each module implementing its own shim around the various |
5 |
> > methods for accessing extended attributes, start a dedicated module |
6 |
> > that exports a consistent API. |
7 |
> |
8 |
> Some things are incompatible with Python 3. |
9 |
> See other comments below. |
10 |
|
11 |
i can run a linter on the code (probably should make this a git hook). i'm |
12 |
interested more in review on the bigger picture. |
13 |
|
14 |
also, please snip context you aren't actually replying to. it makes it much |
15 |
harder to read replies when you don't do that. |
16 |
|
17 |
> > + @staticmethod |
18 |
> > + def set(item, name, value, flags=0, namespace=None): |
19 |
> > + if namespace: |
20 |
> > + name = '%s.%s' % (namespace, name) |
21 |
> > + cmd = ['setfattr', '-n', name, '-v', value, item] |
22 |
> |
23 |
> Calling setfattr once per attribute is slower than once per file (as is |
24 |
> now). |
25 |
|
26 |
true, however: |
27 |
- setfattr is the fallback logic, not the primary code path |
28 |
- the # of attributes per file is low (rarely more than 2) |
29 |
-mike |