Commit 01b2ca0a authored by Lucas Carvalho's avatar Lucas Carvalho

Modified to provide backward compatibility.

The slapos.libnetworkcache == 0.2 does not provide the signature script.

So, it should not be used if such script is not available.
parent 8a894bb6
...@@ -364,7 +364,11 @@ def buildoutSetUp(test): ...@@ -364,7 +364,11 @@ def buildoutSetUp(test):
def create_signature_file_list(path, def create_signature_file_list(path,
private_key_file='private.pem', private_key_file='private.pem',
certificate_file='public.pem'): certificate_file='public.pem'):
from slapos.signature import createPrivateKeyAndCertificateFile try:
from slapos.signature import createPrivateKeyAndCertificateFile
except ImportError:
return private_key_file, certificate_file
private_key_file = os.path.join(path, private_key_file) private_key_file = os.path.join(path, private_key_file)
certificate_file = os.path.join(path, certificate_file) certificate_file = os.path.join(path, certificate_file)
createPrivateKeyAndCertificateFile(certificate_file, private_key_file) createPrivateKeyAndCertificateFile(certificate_file, private_key_file)
......
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