Fix some issues found by lgtm.com
This commit is contained in:
parent
6938d1f513
commit
8ee5c0993f
|
@ -12,7 +12,6 @@
|
||||||
# Date: March 10, 2016
|
# Date: March 10, 2016
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
class BasePCItems:
|
class BasePCItems:
|
||||||
|
@ -55,7 +54,7 @@ class BasePCItems:
|
||||||
|
|
||||||
# check and setup the exec_prefix
|
# check and setup the exec_prefix
|
||||||
if getattr(args, 'exec_prefix', None) is None:
|
if getattr(args, 'exec_prefix', None) is None:
|
||||||
exec_prefix_use_shorthand = True
|
# exec_prefix_use_shorthand = True
|
||||||
self.exec_prefix = '${prefix}'
|
self.exec_prefix = '${prefix}'
|
||||||
else:
|
else:
|
||||||
if args.exec_prefix.startswith('${prefix}'):
|
if args.exec_prefix.startswith('${prefix}'):
|
||||||
|
|
|
@ -10,10 +10,8 @@
|
||||||
# Author: Fan, Chun-wei
|
# Author: Fan, Chun-wei
|
||||||
# Date: September 03, 2014
|
# Date: September 03, 2014
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
import string
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
valid_actions = ['remove-prefix',
|
valid_actions = ['remove-prefix',
|
||||||
|
|
|
@ -222,7 +222,6 @@ The bytes in the generated array has the following meaning:
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
import time
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
class InputError(Exception):
|
class InputError(Exception):
|
||||||
|
@ -565,7 +564,7 @@ def parse_psl(infile, utf_mode, codecs):
|
||||||
if section == 0:
|
if section == 0:
|
||||||
if b'===BEGIN ICANN DOMAINS===' in line:
|
if b'===BEGIN ICANN DOMAINS===' in line:
|
||||||
section = PSL_FLAG_ICANN
|
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
|
section = PSL_FLAG_PRIVATE
|
||||||
elif section == PSL_FLAG_ICANN and b'===END ICANN DOMAINS===' in line:
|
elif section == PSL_FLAG_ICANN and b'===END ICANN DOMAINS===' in line:
|
||||||
section = 0
|
section = 0
|
||||||
|
|
Loading…
Reference in New Issue