Refactoring, added docstrings
This commit is contained in:
@@ -4,16 +4,6 @@ import shutil
|
||||
import sys
|
||||
|
||||
|
||||
def dir_size(start_path):
|
||||
total_size = 0
|
||||
for dirpath, dirnames, filenames in os.walk(start_path):
|
||||
for f in filenames:
|
||||
fp = os.path.join(dirpath, f)
|
||||
if not os.path.islink(fp):
|
||||
total_size += os.path.getsize(fp)
|
||||
return total_size
|
||||
|
||||
|
||||
def get_resource_path(filename):
|
||||
application_path = 'resources'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user