utils/get-developers: use Developers.hasfile() where appropriate
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 19 Nov 2020 14:53:53 +0000 (15:53 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 17 Jan 2021 14:32:07 +0000 (15:32 +0100)
Instead of open-coding Developers.hasfile() in utils/get-developers,
use it directly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
utils/get-developers

index 750fc556dc2c976efa013a812ee0418726855f83..20272ed60b95ed3f2272edfa020b5232f143732e 100755 (executable)
@@ -77,9 +77,8 @@ def __main__():
     if args.files is not None:
         args.files = [os.path.abspath(f) for f in args.files]
         for dev in devs:
-            for devfile in dev.files:
-                commonfiles = [f for f in args.files if f.startswith(devfile)]
-                if commonfiles:
+            for f in args.files:
+                if dev.hasfile(f):
                     print(dev.name)
                     break