mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Fix ups
This commit is contained in:
parent
d86cacddf9
commit
ddabeed530
@ -308,7 +308,7 @@ class SourcePackage(object):
|
|||||||
"Write dsc file to workdir"
|
"Write dsc file to workdir"
|
||||||
if self._dsc is None:
|
if self._dsc is None:
|
||||||
self.pull_dsc()
|
self.pull_dsc()
|
||||||
with open(self.dsc_pathname, 'w') as f:
|
with open(self.dsc_pathname, 'wb') as f:
|
||||||
f.write(self.dsc.raw_text)
|
f.write(self.dsc.raw_text)
|
||||||
|
|
||||||
def _download_file(self, url, filename):
|
def _download_file(self, url, filename):
|
||||||
|
@ -45,6 +45,7 @@ class HelpTestCase(unittest.TestCase):
|
|||||||
null = open('/dev/null', 'r')
|
null = open('/dev/null', 'r')
|
||||||
process = subprocess.Popen(['./' + script, '--help'],
|
process = subprocess.Popen(['./' + script, '--help'],
|
||||||
close_fds=True, stdin=null,
|
close_fds=True, stdin=null,
|
||||||
|
universal_newlines=True,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE)
|
stderr=subprocess.PIPE)
|
||||||
started = time.time()
|
started = time.time()
|
||||||
@ -57,7 +58,10 @@ class HelpTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
while time.time() - started < TIMEOUT:
|
while time.time() - started < TIMEOUT:
|
||||||
for fd in select.select(fds, [], fds, TIMEOUT)[0]:
|
for fd in select.select(fds, [], fds, TIMEOUT)[0]:
|
||||||
out.append(os.read(fd, 1024))
|
output = os.read(fd, 1024)
|
||||||
|
if not isinstance(output, str):
|
||||||
|
output = output.decode('utf-8')
|
||||||
|
out.append(output)
|
||||||
if process.poll() is not None:
|
if process.poll() is not None:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user