Trivial Fix: Replace exit() with sys.exit()
exit() is used for interactive shell, it relies on the site module. sys.exit() is considered good to use in programs. ref: http://stackoverflow.com/questions/6501121/the-difference-between-exit-and-sys-exit-in-python Change-Id: I3daf89c623011321e5f88b80e96f54f8ef524c97
This commit is contained in:
parent
204f137df0
commit
e70956f608
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
import argparse
|
||||
import six
|
||||
import sys
|
||||
|
||||
from barbican.plugin.crypto import pkcs11
|
||||
|
||||
@ -89,7 +90,7 @@ class KeyGenerator(object):
|
||||
"The label {label} already exists! "
|
||||
"Please try again.".format(label=label)
|
||||
)
|
||||
exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
def generate_mkek(self, args):
|
||||
"""Process the generate MKEK with given arguments"""
|
||||
|
Loading…
Reference in New Issue
Block a user