have explorers been transferred? (type)
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								4beeecd48e
							
						
					
				
			
			
				commit
				
					
						2b1c4df8d9
					
				
			
		
					 2 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
# -*- coding: utf-8 -*-
 | 
			
		||||
#
 | 
			
		||||
# 2010-2011 Steven Armstrong (steven-cdist at armstrong.cc)
 | 
			
		||||
# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
 | 
			
		||||
# 2011 Nico Schottelius (nico-cdist at schottelius.org)
 | 
			
		||||
#
 | 
			
		||||
# This file is part of cdist.
 | 
			
		||||
#
 | 
			
		||||
| 
						 | 
				
			
			@ -68,6 +69,8 @@ class Type(object):
 | 
			
		|||
        self.__required_parameters = None
 | 
			
		||||
        self.__optional_parameters = None
 | 
			
		||||
 | 
			
		||||
        self.transferred_explorers = False
 | 
			
		||||
 | 
			
		||||
    def __repr__(self):
 | 
			
		||||
        return '<Type name=%s>' % self.name
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -255,12 +255,12 @@ class Path:
 | 
			
		|||
    # Stays here - FIXME: adjust to type code, loop over types!
 | 
			
		||||
    def transfer_type_explorers(self, type):
 | 
			
		||||
        """Transfer explorers of a type, but only once"""
 | 
			
		||||
        if type.transferred:
 | 
			
		||||
        if type.transferred_explorers:
 | 
			
		||||
            log.debug("Skipping retransfer for explorers of %s", type)
 | 
			
		||||
            return
 | 
			
		||||
        else:
 | 
			
		||||
            # Do not retransfer
 | 
			
		||||
            type.transferred = True
 | 
			
		||||
            type.transferred_explorers = True
 | 
			
		||||
 | 
			
		||||
        # FIXME: Can be explorer_path or explorer_dir, I don't care.
 | 
			
		||||
        src = type.explorer_path()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue