Don't barf when git fails
I'm not totally sold this is the best idea, but I felt like it while working
This commit is contained in:
		
							parent
							
								
									6c7f1642da
								
							
						
					
					
						commit
						70ac34a672
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -64,7 +64,11 @@ def _git_checkout_by_date(repo, timepoint):
 | 
				
			||||||
        'checkout',
 | 
					        'checkout',
 | 
				
			||||||
        commit,
 | 
					        commit,
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
    output = subprocess.check_output(command, stderr=subprocess.STDOUT)
 | 
					    try:
 | 
				
			||||||
 | 
					        output = subprocess.check_output(command, stderr=subprocess.STDOUT)
 | 
				
			||||||
 | 
					    except subprocess.CalledProcessError:
 | 
				
			||||||
 | 
					        LOGGER.warning("Failed to execute '%s' in %s", command, abspath)
 | 
				
			||||||
 | 
					        return ''
 | 
				
			||||||
    LOGGER.debug("Checked out %s at %s", repo, timepoint.date().isoformat())
 | 
					    LOGGER.debug("Checked out %s at %s", repo, timepoint.date().isoformat())
 | 
				
			||||||
    return output
 | 
					    return output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue