pep8 for init_homepath
This commit is contained in:
parent
c266beac68
commit
bb9b02b79e
@ -6,6 +6,7 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class bcolors:
|
class bcolors:
|
||||||
HEADER = '\033[95m'
|
HEADER = '\033[95m'
|
||||||
OKBLUE = '\033[94m'
|
OKBLUE = '\033[94m'
|
||||||
@ -17,6 +18,7 @@ class bcolors:
|
|||||||
BOLD = '\033[1m'
|
BOLD = '\033[1m'
|
||||||
UNDERLINE = '\033[4m'
|
UNDERLINE = '\033[4m'
|
||||||
|
|
||||||
|
|
||||||
def proceed(ask="Proceed?"):
|
def proceed(ask="Proceed?"):
|
||||||
while True:
|
while True:
|
||||||
uf = input("\n%s [Y/n/q]" % ask)
|
uf = input("\n%s [Y/n/q]" % ask)
|
||||||
@ -29,13 +31,16 @@ def proceed(ask="Proceed?"):
|
|||||||
else:
|
else:
|
||||||
return uf.lower() == "y"
|
return uf.lower() == "y"
|
||||||
|
|
||||||
|
|
||||||
def delete_destination():
|
def delete_destination():
|
||||||
return proceed("/!\\ Delete Destination including ALL files? /!\\")
|
return proceed("/!\\ Delete Destination including ALL files? /!\\")
|
||||||
|
|
||||||
|
|
||||||
def failed(error_msg):
|
def failed(error_msg):
|
||||||
print(" " + bcolors.WARNING + error_msg.rstrip("\n") + bcolors.ENDC)
|
print(" " + bcolors.WARNING + error_msg.rstrip("\n") + bcolors.ENDC)
|
||||||
print(" [" + bcolors.FAIL + " FAILED " + bcolors.ENDC + "]")
|
print(" [" + bcolors.FAIL + " FAILED " + bcolors.ENDC + "]")
|
||||||
|
|
||||||
|
|
||||||
def success():
|
def success():
|
||||||
print(" [" + bcolors.OKGREEN + " SUCCESS " + bcolors.ENDC + "]")
|
print(" [" + bcolors.OKGREEN + " SUCCESS " + bcolors.ENDC + "]")
|
||||||
|
|
||||||
@ -114,4 +119,3 @@ if proceed():
|
|||||||
# Create Symbolic Link
|
# Create Symbolic Link
|
||||||
os.symlink(src, dest)
|
os.symlink(src, dest)
|
||||||
success()
|
success()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user