From: | Zac Medico <zmedico@g.o> | ||
---|---|---|---|
To: | gentoo-portage-dev@l.g.o, "Michał Górny" <mgorny@g.o> | ||
Subject: | Re: [gentoo-portage-dev] [PATCH] FreeBSD: use os.*chflags() instead of calling external tool | ||
Date: | Thu, 22 Feb 2018 18:08:56 | ||
Message-Id: | 9cb11bff-868f-dd02-1eaa-a1c0cc9dc97a@gentoo.org | ||
In Reply to: | [gentoo-portage-dev] [PATCH] FreeBSD: use os.*chflags() instead of calling external tool by "Michał Górny" |
1 | On 02/22/2018 07:18 AM, Michał Górny wrote: |
2 | > - @classmethod |
3 | > - def lchflags(cls, path, flags): |
4 | > - return cls.chflags(path, flags, opts='-h') |
5 | > + @staticmethod |
6 | > + def chflags(path, flags): |
7 | > + return os.chflags(path, flags) |
8 | > + |
9 | > + @staticmethod |
10 | > + def lchflags(path, flags): |
11 | > + return os.lchflags(path, flags) |
12 | |
13 | Can eliminate the indirect function call like this: |
14 | |
15 | chflags = os.chflags |
16 | lchflags = os.lchflags |
17 | |
18 | -- |
19 | Thanks, |
20 | Zac |
File name | MIME type |
---|---|
signature.asc | application/pgp-signature |