From e70956f6081cadc3ba0ec579accd9821e8b97966 Mon Sep 17 00:00:00 2001 From: binean Date: Mon, 25 Jan 2016 17:52:30 +0800 Subject: [PATCH] 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 --- barbican/cmd/pkcs11_key_generation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/barbican/cmd/pkcs11_key_generation.py b/barbican/cmd/pkcs11_key_generation.py index 15e958131..530b4929b 100755 --- a/barbican/cmd/pkcs11_key_generation.py +++ b/barbican/cmd/pkcs11_key_generation.py @@ -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"""