Add missing spaces to Python scripts.

This commit is contained in:
Benjamin Drung 2010-12-27 14:01:03 +01:00
parent f2d17d73a5
commit a3b5e71547
6 changed files with 12 additions and 12 deletions

View File

@ -89,7 +89,7 @@ def get_source(package, version, section, dist, uploader_name, uploader_email,
def build_source(dist, dsc_file): def build_source(dist, dsc_file):
try: try:
if sbuild: if sbuild:
subprocess.check_call(LogCall(["sbuild", "-d", dist,"-A", dsc_file])) subprocess.check_call(LogCall(["sbuild", "-d", dist, "-A", dsc_file]))
else: else:
if not os.path.isdir("buildresult"): if not os.path.isdir("buildresult"):
os.makedirs("buildresult") os.makedirs("buildresult")
@ -101,7 +101,7 @@ def build_source(dist, dsc_file):
sys.exit(1) sys.exit(1)
def test_install(dist, dsc_file): def test_install(dist, dsc_file):
changes_files=glob.glob(os.path.splitext(dsc_file)[0]+"_*.changes") changes_files = glob.glob(os.path.splitext(dsc_file)[0]+"_*.changes")
changes_file = "" changes_file = ""
for temp_file in changes_files: for temp_file in changes_files:
@ -371,7 +371,7 @@ if __name__ == '__main__':
elif o in ("-S", "--with-sbuild"): elif o in ("-S", "--with-sbuild"):
sbuild = True sbuild = True
elif o in ("-C", "--pbuilder"): elif o in ("-C", "--pbuilder"):
pbuilder=a pbuilder = a
elif o in ("-u", "--update"): elif o in ("-u", "--update"):
update = True update = True
elif o in ("-U", "--upload"): elif o in ("-U", "--upload"):

2
dgetlp
View File

@ -203,7 +203,7 @@ def Download(dscinfo, number, filename, verify=True):
if not res[0]: if not res[0]:
error(104, "Verification of %s failed: %s", filename, res[2]) error(104, "Verification of %s failed: %s", filename, res[2])
status("Getting %s", filename) status("Getting %s", filename)
debug("%s%s/%s", base_url,number,filename) debug("%s%s/%s", base_url, number, filename)
try: try:
fd = urllib2.urlopen("%s%s/%s" % (base_url, number, filename)) fd = urllib2.urlopen("%s%s/%s" % (base_url, number, filename))
outfd = open(filename, 'wb') outfd = open(filename, 'wb')

View File

@ -81,7 +81,7 @@ def main():
(howmany, url) = check_args() (howmany, url) = check_args()
if len(url.split("?", 1)) == 2: if len(url.split("?", 1)) == 2:
# search options not supported, because there is no mapping web ui options <-> API options # search options not supported, because there is no mapping web ui options <-> API options
print >> sys.stderr, "Options in url are not supported, url: %s" %url print >> sys.stderr, "Options in url are not supported, url: %s" % url
sys.exit(1) sys.exit(1)
launchpad = None launchpad = None
@ -97,7 +97,7 @@ def main():
except Exception, e: except Exception, e:
x = getattr(e, "response", {}) x = getattr(e, "response", {})
if x.get("status", None) == "404": if x.get("status", None) == "404":
print >> sys.stderr, "The URL at '%s' does not appear to be a valid url to a product" %url print >> sys.stderr, "The URL at '%s' does not appear to be a valid url to a product" % url
sys.exit(1) sys.exit(1)
else: else:
raise raise

View File

@ -39,7 +39,7 @@ if __name__ == '__main__':
try: try:
lp = get_launchpad('ubuntu-dev-tools') lp = get_launchpad('ubuntu-dev-tools')
except Exception, e: except Exception, e:
print >>sys.stderr, 'Could not connect to Launchpad:', str(e) print >> sys.stderr, 'Could not connect to Launchpad:', str(e)
sys.exit(2) sys.exit(2)
for bugnum in args: for bugnum in args:
@ -50,12 +50,12 @@ if __name__ == '__main__':
print " %s: %s" % (task.bug_target_name, task.status) print " %s: %s" % (task.bug_target_name, task.status)
except HTTPError, e: except HTTPError, e:
if e.response.status == 401: if e.response.status == 401:
print >>sys.stderr, \ print >> sys.stderr, \
("E: Don't have enough permissions to access bug %s" % ("E: Don't have enough permissions to access bug %s" %
bugnum) bugnum)
print >>sys.stderr, e.content print >> sys.stderr, e.content
continue continue
elif e.response.status == 404: elif e.response.status == 404:
print >>sys.stderr, "E: Bug %s not found" % bugnum print >> sys.stderr, "E: Bug %s not found" % bugnum
else: else:
raise raise

View File

@ -110,7 +110,7 @@ def create_credentials(options):
def list_tokens(options): def list_tokens(options):
print "Not implemented yet." print "Not implemented yet."
print "To get a list of your tokens, please visit %speople/+me/+oauth-tokens" %translate_api_web(options.service) print "To get a list of your tokens, please visit %speople/+me/+oauth-tokens" % translate_api_web(options.service)
return 1 return 1
def main(): def main():

View File

@ -48,7 +48,7 @@ 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 >> sys.stderr, '%s does not appear to be an Ubuntu ISO' % iso
err = True err = True
continue continue