From 8ee5c0993f0287c212abce4f81b8960b4cc152d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Mon, 15 Oct 2018 17:40:29 +0200 Subject: [PATCH] Fix some issues found by lgtm.com --- msvc/pc_base.py | 3 +-- msvc/replace.py | 2 -- src/psl-make-dafsa | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/msvc/pc_base.py b/msvc/pc_base.py index 285b6cd..a903041 100644 --- a/msvc/pc_base.py +++ b/msvc/pc_base.py @@ -12,7 +12,6 @@ # Date: March 10, 2016 import os -import sys import argparse class BasePCItems: @@ -55,7 +54,7 @@ class BasePCItems: # check and setup the exec_prefix if getattr(args, 'exec_prefix', None) is None: - exec_prefix_use_shorthand = True + # exec_prefix_use_shorthand = True self.exec_prefix = '${prefix}' else: if args.exec_prefix.startswith('${prefix}'): diff --git a/msvc/replace.py b/msvc/replace.py index 3aeceb1..d67720d 100644 --- a/msvc/replace.py +++ b/msvc/replace.py @@ -10,10 +10,8 @@ # Author: Fan, Chun-wei # Date: September 03, 2014 -import os import sys import re -import string import argparse valid_actions = ['remove-prefix', diff --git a/src/psl-make-dafsa b/src/psl-make-dafsa index 8f5bb76..0962ffd 100755 --- a/src/psl-make-dafsa +++ b/src/psl-make-dafsa @@ -222,7 +222,6 @@ The bytes in the generated array has the following meaning: import sys import os.path -import time import hashlib class InputError(Exception): @@ -565,7 +564,7 @@ def parse_psl(infile, utf_mode, codecs): if section == 0: if b'===BEGIN ICANN DOMAINS===' in line: section = PSL_FLAG_ICANN - elif section == 0 and b'===BEGIN PRIVATE DOMAINS===' in line: + elif b'===BEGIN PRIVATE DOMAINS===' in line: section = PSL_FLAG_PRIVATE elif section == PSL_FLAG_ICANN and b'===END ICANN DOMAINS===' in line: section = 0