Bug #8475

Python3 Syntax errors

Added by Matthew Poletiek about 1 month ago. Updated about 1 month ago.

Status:New Start date:11/25/2020
Priority:Normal Due date:
Assignee:Matthew Poletiek % Done:

0%

Category:-
Target version:chirp-py3
Chirp Version:daily Platform:All
Model affected:(All models)

Description

Looks like the current py3 branch has 2 syntax errors. The first I discovered was in chirp/ui/mainapp.py on line 1140.

print query

needs to be
print(query)

Also, in chirp/drivers/vx6.py on line 874

except Exception, e:

needs to be
except (Exception, e):

After these changes were made py3 worked as I expected it to.

py3syntax.patch (1.1 kB) Matthew Poletiek, 11/25/2020 10:34 am

py3syntax.patch (1.1 kB) Matthew Poletiek, 12/14/2020 07:59 pm

History

Updated by Matthew Poletiek about 1 month ago

Created the following patch to fix this.

Updated by Matthew Poletiek about 1 month ago

Better Patch

Updated by Matthew Poletiek about 1 month ago

Updated patch with better syntax.

except (Exception, e): wasn't correct.

Correct answer is except Exception as e:

Also available in: Atom PDF

prevent spam