O2-DQ User Interface 1.0.0
Loading...
Searching...
No Matches
pycacheRemover Namespace Reference

Classes

class  PycacheRemover
 

Functions

def runPycacheRemover ()
 

Function Documentation

◆ runPycacheRemover()

def runPycacheRemover ( )
This function run two python command and it provides recursively deletes pycache files

Raises:
    BaseException: If not path exists in OS

Definition at line 42 of file pycacheRemover.py.

42def runPycacheRemover():
43 """This function run two python command and it provides recursively deletes pycache files
44
45 Raises:
46 BaseException: If not path exists in OS
47 """
48
49 pycacheRemover = PycacheRemover()
50
51 try:
52 parentPath = os.getcwd()
53 if os.path.exists(parentPath):
54 logging.info("Inserting inside for pycache remove: %s", os.getcwd())
55 pycacheRemover.__init__()
56 logging.info("pycaches removed succesfully")
57
58 elif not os.path.exists(parentPath):
59 raise BaseException
60
61 # Caching the exception
62 except BaseException:
63 logging.exception("Something wrong with specified\
64 directory. Exception- %s", sys.exc_info(),)
65 sys.exit()