collect.py: fix open for Python versions < 3.6
authorPetr Štetiar <ynezz@true.cz>
Sun, 13 Sep 2020 09:14:44 +0000 (11:14 +0200)
committerPetr Štetiar <ynezz@true.cz>
Sun, 13 Sep 2020 09:23:38 +0000 (11:23 +0200)
commitee62fade7eac2a7ade21720d0272c3bc814c6ea8
treedf7ee129a1f9af5ed70deb731f8c1cd61ec8117a
parent1891e021306a9a1f8fedc578e6477ce4282ba1d2
collect.py: fix open for Python versions < 3.6

 The built-in open() function has been updated to accept os.PathLike
 objects, as have all relevant functions in the os and os.path modules,
 and most other functions and classes in the standard library.

Fixes following issue:

 File "misc/collect.py", line 260, in scan
   with open(ppath, "r", encoding='utf-8') as file:
 TypeError: invalid file: PosixPath('tests/profiles/snapshots/targets/ipq806x/generic/profiles.json')

Ref: https://docs.python.org/3/whatsnew/3.6.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
misc/collect.py