From ca68195b5d12c5410cfac8d459a0b0902c4c72c7 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 1 Dec 2020 18:50:12 +0100 Subject: fpga: Remove Python2 support from build system - 2to3 was used to convert the Python scripts, except where the tool choked and manual intervention was required - All references to "python" where replaced with "python3" - buffer() was replaced by memoryview() --- fpga/usrp3/tools/scripts/viv_gen_part_id.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fpga/usrp3/tools/scripts/viv_gen_part_id.py') diff --git a/fpga/usrp3/tools/scripts/viv_gen_part_id.py b/fpga/usrp3/tools/scripts/viv_gen_part_id.py index b82c146aa..dc014aac2 100644 --- a/fpga/usrp3/tools/scripts/viv_gen_part_id.py +++ b/fpga/usrp3/tools/scripts/viv_gen_part_id.py @@ -1,8 +1,7 @@ -#!/usr/bin/python +#!/usr/bin/env python3 import argparse -import os, sys -import re +import sys # Parse command line options def get_options(): @@ -21,7 +20,7 @@ def main(): target_tok = args.target.split('/') if len(target_tok) < 4: print('ERROR: Invalid target format. Must be ///[/[/]]') - print('ERROR: Parsed only ' + str(len(target_tok)) + ' tokens') + print('ERROR: Parsed only ' + str(len(target_tok)) + ' tokens') sys.exit(1) if target_tok[0] in ['artix7', 'kintex7', 'zynq', 'spartan7', 'virtex7']: print('' + target_tok[1] + target_tok[2] + target_tok[3]) -- cgit v1.2.3