From ebef954cf9f3bb505d0ea41a1783041d01c3dd9d Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 18 Oct 2021 15:14:15 +0200 Subject: [PATCH] --private-key is optional --- peerix/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/peerix/__main__.py b/peerix/__main__.py index 603bc3f..accd7b6 100644 --- a/peerix/__main__.py +++ b/peerix/__main__.py @@ -17,7 +17,8 @@ parser.add_argument("--private-key", required=False) def run(): args = parser.parse_args() - os.environ["NIX_SECRET_KEY_FILE"] = os.path.abspath(os.path.expanduser(args.private_key)) + if args.private_key is not None: + os.environ["NIX_SECRET_KEY_FILE"] = os.path.abspath(os.path.expanduser(args.private_key)) logging.basicConfig(level=args.loglevel) uvloop.install()