Skip to content

Commit e5f7f99

Browse files
committed
script: fix bitwise AND logic on gitlog2changelog.py
Several if conditions where using bitwise AND whereas the intent was to do a regular AND test.
1 parent b9aff6c commit e5f7f99

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.hunspell.en.dic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,3 +1136,4 @@ hdf5
11361136
boolvar
11371137
foss21a
11381138
othervariant
1139+
bitwise

script/gitlog2changelog.py.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ for line in fin:
119119
elif "Signed-off-by" in line:
120120
continue
121121
# Extract the actual commit message for this commit
122-
elif authorFound & dateFound & messageFound is False:
122+
elif authorFound and dateFound and messageFound is False:
123123
# Find the commit message if we can
124124
if len(line) == fin_chop:
125125
if messageNL:
@@ -138,15 +138,15 @@ for line in fin:
138138
filesFound = True
139139
continue
140140
# Collect the files for this commit. FIXME: Still need to add +/- to files
141-
elif authorFound & dateFound & messageFound:
141+
elif authorFound and dateFound and messageFound:
142142
fileList = re.split(r' \| ', line, 2)
143143
if len(fileList) > 1:
144144
if len(files) > 0:
145145
files = files + ", " + fileList[0].strip()
146146
else:
147147
files = fileList[0].strip()
148148
# All of the parts of the commit have been found - write out the entry
149-
if authorFound & dateFound & messageFound & filesFound:
149+
if authorFound and dateFound and messageFound and filesFound:
150150
# First the author line, only outputted if it is the first for that
151151
# author on this day
152152
authorLine = date + " " + author

0 commit comments

Comments
 (0)