patchwork "parser: Remove 'main' function"

Stephen Fincane stephen at
Fri Nov 18 10:09:56 AEDT 2016

On Thu, 2016-11-17 at 19:30 +0000, Paul Jakma wrote:

CCing the list.

> Hi Stephen,
> I was using trying to setup patchwork, using latest git. I ran into
> an 
> issue following the instructions to use the scripts in tools/ to
> update 
> the status of existing commits and new commits. The 
> tools/{patchwork-update-commits,ost-receive.hook} scripts both use 
> to calculate the patch hash:
> $ grep tools/*
> grep: tools/docker: Is a directory
> tools/patchwork-update-commits: hash=$(git show "$commit" | python 
> $pwpath/ -#)
> tools/post-receive.hook:  hash=$(git show -C $1 | python 
> $PWDIR/ --hash)
> Except of course, the main function is now gone and doesn't
> do 
> anything anymore of itself. Also, the next commit removes the
> hash_diff 
> functions and stuff.
> I don't see an equivalent command added for, that could
> obtain 
> the hash, for these scripts to work?
> Any ideas on what to do there?

Ohhh, I never saw those calls. That's a bug. I'll add the missing
functionality back into the parsemail script post haste.

> Reverting those 2 commits, and some tweaking (e.g. I needed to add 
> 'import django\ndjango.setup()", and also got a "AttributeError:
> 'str' 
> object has no attribute 'decode'" error cause of my python version -
>> just removed the '.decode') sort of got it working it seems.

Let me know if this is still an issue once you apply the fix(es).


More information about the Patchwork mailing list