@@ -93,8 +93,7 @@ def parse_list(content, trusted=False):
9393
9494def print_restricted_name (output_fd , name , time_restrictions ):
9595 if name in time_restrictions :
96- print ("{}\t {}" .format (
97- name , time_restrictions [name ]), file = output_fd , end = "\n " )
96+ print ("{}\t {}" .format (name , time_restrictions [name ]), file = output_fd , end = "\n " )
9897 else :
9998 print (
10099 "# ignored: [{}] was in the time-restricted list, "
@@ -122,8 +121,7 @@ def load_from_url(url):
122121 except urllib .URLError as err :
123122 raise Exception ("[{}] could not be loaded: {}\n " .format (url , err ))
124123 if trusted is False and response .getcode () != 200 :
125- raise Exception ("[{}] returned HTTP code {}\n " .format (
126- url , response .getcode ()))
124+ raise Exception ("[{}] returned HTTP code {}\n " .format (url , response .getcode ()))
127125 content = response .read ()
128126 if URLLIB_NEW :
129127 content = content .decode ("utf-8" , errors = "replace" )
@@ -265,12 +263,10 @@ def blocklists_from_config_file(
265263
266264 list_names .sort (key = name_cmp )
267265 if ignored :
268- print ("# Ignored duplicates: {}" .format (
269- ignored ), file = output_fd , end = "\n " )
266+ print ("# Ignored duplicates: {}" .format (ignored ), file = output_fd , end = "\n " )
270267 if glob_ignored :
271268 print (
272- "# Ignored due to overlapping local patterns: {}" .format (
273- glob_ignored ),
269+ "# Ignored due to overlapping local patterns: {}" .format (glob_ignored ),
274270 file = output_fd ,
275271 end = "\n " ,
276272 )
0 commit comments