patchew-project / patchew

A patch email tracking and testing system
MIT License
72 stars 24 forks source link

patchew-cli apply: TypeError: expected str, bytes or os.PathLike object, not NoneType #125

Closed ehabkost closed 4 years ago

ehabkost commented 4 years ago

patchew-cli fails when trying to apply patches to my local branch:

[qemu/python-next=]$ patchew-cli apply 'id:20200228071914.11746-1-vsementsov@virtuozzo.com'
Traceback (most recent call last):
  File "/home/ehabkost/bin/patchew-cli", line 960, in do
    signoff=args.signoff,
  File "/home/ehabkost/bin/patchew-cli", line 782, in _apply
    maintainers = maintainers.union(self._get_maintainers(repo, patchf.name))
  File "/home/ehabkost/bin/patchew-cli", line 737, in _get_maintainers
    script = os.path.join(repo, "scripts/get_maintainer.pl")
  File "/usr/lib64/python3.7/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Bisected to commit efe321080b375c6d67dd0cae41fd9f4fd1373ae4, which is the commit that introduced _get_maintainers() in the first place.

patchew-cli version: latest git (5963bd3). QEMU tree where I'm running patchew-cli: qemu.git commit e0175b7163.

famz commented 4 years ago

Hi Eduado,

This should fix it:

https://github.com/patchew-project/patchew/commit/0efea5d069d659fe09e9eeb89ac54114464d671a

Thank for the reporting!

Fam