Commit 214bbabb authored by Ludovic Rousseau's avatar Ludovic Rousseau

sort_smartcard_list: code reformat using black(1)

parent ecdbed45
......@@ -4,6 +4,7 @@ from __future__ import print_function
import difflib
import pprint
pp = pprint.PrettyPrinter(indent=4)
ATRs = list()
......@@ -23,16 +24,16 @@ with open("smartcard_list.txt", "r") as f:
print("error:", l)
ATRs.append(l.strip())
# if l.startswith("\t"):
# ATRs.append([atr, l.strip()])
# else:
# atr = l.strip()
# if l.startswith("\t"):
# ATRs.append([atr, l.strip()])
# else:
# atr = l.strip()
#pp.pprint(ATRs)
# pp.pprint(ATRs)
sorted_ATRs = list(ATRs)
sorted_ATRs.sort()
#pp.pprint(sorted_ATRs)
# pp.pprint(sorted_ATRs)
for l in difflib.context_diff(ATRs, sorted_ATRs):
print(l)
......@@ -45,9 +46,9 @@ p2 = Popen(["grep", "+3[B,F]"], stdin=p1.stdout, stdout=PIPE)
p1.stdout.close()
output = p2.communicate()[0]
output = output.decode('utf-8')
output = output.decode("utf-8")
size = len(output.split("\n"))-1
size = len(output.split("\n")) - 1
if size >= 10:
print()
print("********************")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment