mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-11 08:51:29 +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',
|
'submittodebian',
|
||||||
'syncpackage',
|
'syncpackage',
|
||||||
'ubuntu-build',
|
'ubuntu-build',
|
||||||
|
'ubuntu-iso',
|
||||||
]
|
]
|
||||||
data_files = [
|
data_files = [
|
||||||
('share/bash-completion/completions', glob.glob("bash_completion/*")),
|
('share/bash-completion/completions', glob.glob("bash_completion/*")),
|
||||||
@ -54,7 +55,6 @@ else:
|
|||||||
scripts = [
|
scripts = [
|
||||||
'import-bug-from-debian',
|
'import-bug-from-debian',
|
||||||
'merge-changelog',
|
'merge-changelog',
|
||||||
'ubuntu-iso',
|
|
||||||
'ubuntu-upload-permission',
|
'ubuntu-upload-permission',
|
||||||
'update-maintainer',
|
'update-maintainer',
|
||||||
]
|
]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python3
|
||||||
|
|
||||||
# ubuntuiso - tool to examine Ubuntu CD (ISO) installation media
|
# ubuntuiso - tool to examine Ubuntu CD (ISO) installation media
|
||||||
# Copyright (C) 2008 Canonical Ltd.
|
# Copyright (C) 2008 Canonical Ltd.
|
||||||
@ -29,7 +29,7 @@ from ubuntutools import subprocess
|
|||||||
def extract(iso, path):
|
def extract(iso, path):
|
||||||
command = ['isoinfo', '-R', '-i', iso, '-x', path]
|
command = ['isoinfo', '-R', '-i', iso, '-x', path]
|
||||||
pipe = subprocess.Popen(command, stdout=subprocess.PIPE,
|
pipe = subprocess.Popen(command, stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE)
|
stderr=subprocess.PIPE, encoding='utf-8')
|
||||||
stdout, stderr = pipe.communicate()
|
stdout, stderr = pipe.communicate()
|
||||||
|
|
||||||
if pipe.returncode != 0:
|
if pipe.returncode != 0:
|
||||||
@ -55,11 +55,12 @@ def main():
|
|||||||
version = extract(iso, '/.disk/info')
|
version = extract(iso, '/.disk/info')
|
||||||
|
|
||||||
if len(version) == 0:
|
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
|
err = True
|
||||||
continue
|
continue
|
||||||
|
|
||||||
print prefix + version
|
print(prefix + version)
|
||||||
|
|
||||||
if err:
|
if err:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user