Migrate scripts from spinal.walk_generator to spinal.walk.
This commit is contained in:
		
							parent
							
								
									26d5ff5730
								
							
						
					
					
						commit
						2d2e80824f
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -1734,7 +1734,7 @@ class PDBUtilMixin: | ||||||
|         albums_by_path = {} |         albums_by_path = {} | ||||||
| 
 | 
 | ||||||
|         self.log.info('Digesting directory "%s".', directory.absolute_path) |         self.log.info('Digesting directory "%s".', directory.absolute_path) | ||||||
|         walk_generator = spinal.walk_generator( |         walk_generator = spinal.walk( | ||||||
|             directory, |             directory, | ||||||
|             exclude_directories=exclude_directories, |             exclude_directories=exclude_directories, | ||||||
|             exclude_filenames=exclude_filenames, |             exclude_filenames=exclude_filenames, | ||||||
|  |  | ||||||
|  | @ -273,7 +273,7 @@ def export_symlinks_argparse(args): | ||||||
|     if not args.prune or args.dry_run: |     if not args.prune or args.dry_run: | ||||||
|         return |         return | ||||||
| 
 | 
 | ||||||
|     symlinks = spinal.walk_generator(destination, yield_directories=True, yield_files=True) |     symlinks = spinal.walk(destination, yield_directories=True, yield_files=True) | ||||||
|     symlinks = set(path for path in symlinks if path.is_link) |     symlinks = set(path for path in symlinks if path.is_link) | ||||||
|     symlinks = symlinks.difference(total_paths) |     symlinks = symlinks.difference(total_paths) | ||||||
|     for old_symlink in symlinks: |     for old_symlink in symlinks: | ||||||
|  | @ -282,7 +282,7 @@ def export_symlinks_argparse(args): | ||||||
|         if not old_symlink.parent.listdir(): |         if not old_symlink.parent.listdir(): | ||||||
|             os.rmdir(old_symlink.parent.absolute_path) |             os.rmdir(old_symlink.parent.absolute_path) | ||||||
| 
 | 
 | ||||||
|     checkdirs = set(spinal.walk_generator(destination, yield_directories=True, yield_files=False)) |     checkdirs = set(spinal.walk(destination, yield_directories=True, yield_files=False)) | ||||||
|     while checkdirs: |     while checkdirs: | ||||||
|         check = checkdirs.pop() |         check = checkdirs.pop() | ||||||
|         if check not in destination: |         if check not in destination: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue