Skip to content

Commit

Permalink
script: fix bitwise AND logic on gitlog2changelog.py
Browse files Browse the repository at this point in the history
Several if conditions where using bitwise AND whereas the intent was to
do a regular AND test.
  • Loading branch information
xdelaruelle committed Jun 3, 2023
1 parent b9aff6c commit e5f7f99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .hunspell.en.dic
Original file line number Diff line number Diff line change
Expand Up @@ -1136,3 +1136,4 @@ hdf5
boolvar
foss21a
othervariant
bitwise
6 changes: 3 additions & 3 deletions script/gitlog2changelog.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ for line in fin:
elif "Signed-off-by" in line:
continue
# Extract the actual commit message for this commit
elif authorFound & dateFound & messageFound is False:
elif authorFound and dateFound and messageFound is False:
# Find the commit message if we can
if len(line) == fin_chop:
if messageNL:
Expand All @@ -138,15 +138,15 @@ for line in fin:
filesFound = True
continue
# Collect the files for this commit. FIXME: Still need to add +/- to files
elif authorFound & dateFound & messageFound:
elif authorFound and dateFound and messageFound:
fileList = re.split(r' \| ', line, 2)
if len(fileList) > 1:
if len(files) > 0:
files = files + ", " + fileList[0].strip()
else:
files = fileList[0].strip()
# All of the parts of the commit have been found - write out the entry
if authorFound & dateFound & messageFound & filesFound:
if authorFound and dateFound and messageFound and filesFound:
# First the author line, only outputted if it is the first for that
# author on this day
authorLine = date + " " + author
Expand Down

0 comments on commit e5f7f99

Please sign in to comment.