From bb9b02b79edb60d6cecca3c6f6eca582b9cb8a36 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Mon, 10 Apr 2023 07:35:11 +0200 Subject: [PATCH] pep8 for init_homepath --- init_homepath | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init_homepath b/init_homepath index bdfef11..87ff039 100755 --- a/init_homepath +++ b/init_homepath @@ -6,6 +6,7 @@ import shutil import subprocess import sys + class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' @@ -17,6 +18,7 @@ class bcolors: BOLD = '\033[1m' UNDERLINE = '\033[4m' + def proceed(ask="Proceed?"): while True: uf = input("\n%s [Y/n/q]" % ask) @@ -29,13 +31,16 @@ def proceed(ask="Proceed?"): else: return uf.lower() == "y" + def delete_destination(): return proceed("/!\\ Delete Destination including ALL files? /!\\") + def failed(error_msg): print(" " + bcolors.WARNING + error_msg.rstrip("\n") + bcolors.ENDC) print(" [" + bcolors.FAIL + " FAILED " + bcolors.ENDC + "]") + def success(): print(" [" + bcolors.OKGREEN + " SUCCESS " + bcolors.ENDC + "]") @@ -48,7 +53,7 @@ REPOS = ( ) print("Cloning the following repositories:") for data in REPOS: - print(" %s --> %s" % data) + print(" %s --> %s" % data) if proceed(): for url, target in REPOS: command = "git clone %s %s" % (url, target) @@ -114,4 +119,3 @@ if proceed(): # Create Symbolic Link os.symlink(src, dest) success() -