From 72e75083f4a96ad642eaede4105f5dffb057346d Mon Sep 17 00:00:00 2001 From: Andrea Cimbalo Date: Sat, 10 Sep 2016 12:10:34 +0000 Subject: [PATCH] log only to file, sign cli in ca_manager.py --- ca_manager.py | 18 ++++++++++++++++-- cli.py | 20 -------------------- 2 files changed, 16 insertions(+), 22 deletions(-) delete mode 100755 cli.py diff --git a/ca_manager.py b/ca_manager.py index e00534c..f6ff82f 100755 --- a/ca_manager.py +++ b/ca_manager.py @@ -13,8 +13,6 @@ import tempfile from certificate_requests import * from paths import * - - class CAManager(object): """ Middleware to interact with ssh-keygen @@ -232,3 +230,19 @@ def sign_request(ca_manager, request_name, authority_name): ca_manager.drop_request(request) shutil.copy(cert_path, os.path.join(RESULTS_PATH, request.req_id)) + + +if __name__ == '__main__': + from ca_shell import CAManagerShell + + init_manager([ + MANAGER_PATH, + REQUESTS_PATH, + OUTPUT_PATH, + RESULTS_PATH, + ]) + + + with CAManager(MANAGER_PATH) as ca_manager: + + CAManagerShell(ca_manager).cmdloop() diff --git a/cli.py b/cli.py deleted file mode 100755 index e0c9501..0000000 --- a/cli.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -from ca_shell import CAManagerShell -from ca_manager import CAManager, init_manager -from paths import * - -if __name__ == '__main__': - - init_manager([ - MANAGER_PATH, - REQUESTS_PATH, - OUTPUT_PATH, - RESULTS_PATH, - ]) - - - with CAManager(MANAGER_PATH) as ca_manager: - - CAManagerShell(ca_manager).cmdloop()