mirror of
				https://git.launchpad.net/ubuntu-dev-tools
				synced 2025-11-04 07:54:03 +00:00 
			
		
		
		
	seeded-in-ubuntu: Catch errors in parsing data, and don't keep unreadable
data cached (LP: #1008783)
This commit is contained in:
		
							parent
							
								
									139e5dfda7
								
							
						
					
					
						commit
						fa83ac6b0b
					
				
							
								
								
									
										2
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@ -24,6 +24,8 @@ ubuntu-dev-tools (0.143) UNRELEASED; urgency=low
 | 
			
		||||
  * Correct metavar for --mirror in backportpackage (LP: #999727)
 | 
			
		||||
  * submittodebian: Explitictly UTF-8 encode the bug body (LP: #1005834)
 | 
			
		||||
  * backportpackage.1: Document --key and --dont-sign (LP: #1007564)
 | 
			
		||||
  * seeded-in-ubuntu: Catch errors in parsing data, and don't keep unreadable
 | 
			
		||||
    data cached (LP: #1008783)
 | 
			
		||||
 | 
			
		||||
 -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Wed, 06 Jun 2012 09:53:24 -0400
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -43,8 +43,14 @@ def load_index(url):
 | 
			
		||||
            os.makedirs(cachedir)
 | 
			
		||||
        urllib.urlretrieve(url, fn)
 | 
			
		||||
 | 
			
		||||
    with gzip.open(fn, 'r') as f:
 | 
			
		||||
        return json.load(f)
 | 
			
		||||
    try:
 | 
			
		||||
        with gzip.open(fn, 'r') as f:
 | 
			
		||||
            return json.load(f)
 | 
			
		||||
    except Exception, e:
 | 
			
		||||
        Logger.error("Unable to parse seed data: %s. "
 | 
			
		||||
                     "Deleting cached data, please try again.",
 | 
			
		||||
                     str(e))
 | 
			
		||||
        os.unlink(fn)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def resolve_binaries(sources):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user