mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-27 14:23:18 +03:00
Made osx-patch-ccid fail gracefully.
Throwing an exception causes the installer to fail, which we don't want.
This commit is contained in:
parent
46d6da81dc
commit
ed5e4c8fcc
@ -52,19 +52,22 @@ def restart_pcscd():
|
||||
|
||||
def main():
|
||||
print "Patching file:", FNAME
|
||||
with open(FNAME, 'r') as f:
|
||||
content = f.read()
|
||||
try:
|
||||
with open(FNAME, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
for dev in DEVICES:
|
||||
content = add_device(dev, content)
|
||||
for dev in DEVICES:
|
||||
content = add_device(dev, content)
|
||||
|
||||
print "Saving file:", FNAME
|
||||
with open(FNAME, 'w') as f:
|
||||
f.write(content)
|
||||
print "Saving file:", FNAME
|
||||
with open(FNAME, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
restart_pcscd()
|
||||
restart_pcscd()
|
||||
|
||||
print "Patching complete!"
|
||||
print "Patching complete!"
|
||||
except IOError as e:
|
||||
print "Error patching file:", e
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user