if...else precedence in dget calls

This commit is contained in:
Stefano Rivera 2010-12-24 13:47:22 +02:00
parent 0a64cae0da
commit 5182d62de1
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ def pull(package, version, unpack=False):
urls.append(dsc_url(DEFAULT_DEBIAN_MIRROR, 'main', package, version))
for url in urls:
cmd = ('dget', '-u' + 'x' if unpack else 'd', url)
cmd = ('dget', '-u' + ('x' if unpack else 'd'), url)
Logger.command(cmd)
p = subprocess.call(cmd)
if p == 0:

View File

@ -100,7 +100,7 @@ if __name__ == '__main__':
Logger.normal('Fetching the source for %s from %s (%s)...',
package, release.capitalize(), pocket)
for url in urls:
cmd = ('dget', '-u' + 'd' if options.download_only else 'x', url)
cmd = ('dget', '-u' + ('d' if options.download_only else 'x'), url)
Logger.command(cmd)
r = subprocess.call(cmd)
if r == 0: