Advertisement
Guest User

elle love me please

a guest
Nov 22nd, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. def broken():
  2. files = []
  3. file1 = os.path.join("broken_file", "rating4")
  4. os.listdir(file1)
  5. for i in os.listdir("broken_file"):
  6. file1 = os.path.join("broken_file", i)
  7. if os.path.isdir(file1):
  8. for j in os.listdir(file1):
  9. file2 = os.path.join(file1,j)
  10. if os.path.isdir(file2):
  11. for k in os.listdir(file2):
  12. file3 = os.path.join(file2,k)
  13. if os.path.isdir(file3):
  14. for n in os.listdir(file3):
  15. file4 = os.path.join(file3,n)
  16. if os.path.isdir(file4):
  17. pass
  18. else:
  19. files.append(file4)
  20. else:
  21. files.append(file3)
  22.  
  23. else:
  24. files.append(file2)
  25. else:
  26. files.append(file1)
  27. file3 = []
  28. for x in files:
  29. if x[-5:] == ".json":
  30. files.append(x)
  31. return sort_list(files)
  32. broken()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement