mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +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"
|
||||
if self._dsc is None:
|
||||
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)
|
||||
|
||||
def _download_file(self, url, filename):
|
||||
|
@ -45,6 +45,7 @@ class HelpTestCase(unittest.TestCase):
|
||||
null = open('/dev/null', 'r')
|
||||
process = subprocess.Popen(['./' + script, '--help'],
|
||||
close_fds=True, stdin=null,
|
||||
universal_newlines=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
started = time.time()
|
||||
@ -57,7 +58,10 @@ class HelpTestCase(unittest.TestCase):
|
||||
|
||||
while time.time() - started < TIMEOUT:
|
||||
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:
|
||||
break
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user