From 6177847304edf80d0539921fbf71b1e7f85884a4 Mon Sep 17 00:00:00 2001 From: kazix <tmakzmierczak@man.poznan.pl> Date: Thu, 4 Aug 2022 12:30:40 +0200 Subject: [PATCH] fix problem with project_license variable, now can be only: LICENSED or 404 Not Found or Repository not created --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 5d50575..51b308f 100644 --- a/main.py +++ b/main.py @@ -62,8 +62,11 @@ try: c_data = c_response.text c_answer = json.loads(c_data) if "message" in c_answer: - print("License file: ", c_answer['message']) - lic = c_answer['message'] + if c_answer['message'] == '404 Commit Not Found': + lic = 'No created repository' + # print("License file: ", c_answer['message']) + else: + lic = c_answer['message'] if "file_name" in c_answer: print("License file: ", c_answer['file_name']) lic = c_answer['file_name'] -- GitLab