mirror of
				https://git.launchpad.net/ubuntu-dev-tools
				synced 2025-10-31 05:54:03 +00:00 
			
		
		
		
	Port ubuntu-iso
This commit is contained in:
		
							parent
							
								
									6c375255c4
								
							
						
					
					
						commit
						16b9311995
					
				
							
								
								
									
										2
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.py
									
									
									
									
									
								
							| @ -43,6 +43,7 @@ if sys.version_info[0] >= 3: | ||||
|         'submittodebian', | ||||
|         'syncpackage', | ||||
|         'ubuntu-build', | ||||
|         'ubuntu-iso', | ||||
|     ] | ||||
|     data_files = [ | ||||
|         ('share/bash-completion/completions', glob.glob("bash_completion/*")), | ||||
| @ -54,7 +55,6 @@ else: | ||||
|     scripts = [ | ||||
|         'import-bug-from-debian', | ||||
|         'merge-changelog', | ||||
|         'ubuntu-iso', | ||||
|         'ubuntu-upload-permission', | ||||
|         'update-maintainer', | ||||
|     ] | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| #!/usr/bin/python | ||||
| #!/usr/bin/python3 | ||||
| 
 | ||||
| # ubuntuiso - tool to examine Ubuntu CD (ISO) installation media | ||||
| # Copyright (C) 2008 Canonical Ltd. | ||||
| @ -29,7 +29,7 @@ from ubuntutools import subprocess | ||||
| def extract(iso, path): | ||||
|     command = ['isoinfo', '-R', '-i', iso, '-x', path] | ||||
|     pipe = subprocess.Popen(command, stdout=subprocess.PIPE, | ||||
|                             stderr=subprocess.PIPE) | ||||
|                             stderr=subprocess.PIPE, encoding='utf-8') | ||||
|     stdout, stderr = pipe.communicate() | ||||
| 
 | ||||
|     if pipe.returncode != 0: | ||||
| @ -55,11 +55,12 @@ def main(): | ||||
|         version = extract(iso, '/.disk/info') | ||||
| 
 | ||||
|         if len(version) == 0: | ||||
|             print >> sys.stderr, '%s does not appear to be an Ubuntu ISO' % iso | ||||
|             print('%s does not appear to be an Ubuntu ISO' % iso, | ||||
|                   file=sys.stderr) | ||||
|             err = True | ||||
|             continue | ||||
| 
 | ||||
|         print prefix + version | ||||
|         print(prefix + version) | ||||
| 
 | ||||
|     if err: | ||||
|         sys.exit(1) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user