diff options
| author | Peter Jones <pjones@redhat.com> | 2008-09-08 10:50:44 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@vroomfondel.internal.datastacks.com> | 2008-09-08 11:21:02 -0400 |
| commit | ce62c1c27adcf413e80f63faed8ea8f48bf357de (patch) | |
| tree | f5c5354a434fc914297c2c61f643442215d2afb6 /scripts | |
| parent | b9a00e190355e1dce0bc905dc24e3007f8f6b7b1 (diff) | |
| download | anaconda-ce62c1c27adcf413e80f63faed8ea8f48bf357de.tar.gz anaconda-ce62c1c27adcf413e80f63faed8ea8f48bf357de.tar.xz anaconda-ce62c1c27adcf413e80f63faed8ea8f48bf357de.zip | |
Use print() as a function.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/getlangnames.py | 2 | ||||
| -rwxr-xr-x | scripts/makestamp.py | 14 | ||||
| -rw-r--r-- | scripts/maketreeinfo.py | 20 |
3 files changed, 18 insertions, 18 deletions
diff --git a/scripts/getlangnames.py b/scripts/getlangnames.py index 921c86802..3189ca835 100644 --- a/scripts/getlangnames.py +++ b/scripts/getlangnames.py @@ -35,4 +35,4 @@ nameList = names.keys() nameList.sort() for k in nameList: - print "%s\t%s" % (k, names[k]) + print("%s\t%s" % (k, names[k])) diff --git a/scripts/makestamp.py b/scripts/makestamp.py index c3f416c02..5edb86ba0 100755 --- a/scripts/makestamp.py +++ b/scripts/makestamp.py @@ -27,7 +27,7 @@ def usage(): args = "" for key in data: args = "%s [--%s=%s]" %(args, key, key) - print "%s: %s" % (sys.argv[0], args) + print("%s: %s" % (sys.argv[0], args)) sys.exit(1) data = {"timestamp": None, @@ -44,7 +44,7 @@ opts.append("allDiscs") (args, extra) = getopt.getopt(sys.argv[1:], '', opts) if len(extra) > 0: - print "had extra args: %s" % extra + print("had extra args: %s" % extra) usage() for (str, arg) in args: @@ -53,25 +53,25 @@ for (str, arg) in args: elif str == "--allDiscs": allDiscs = 1 else: - print "unknown str of ", str + print("unknown str of ", str) usage() if data["timestamp"] is None: - print >> sys.stderr, "timestamp not specified; using the current time" + print("timestamp not specified; using the current time", file=sys.stderr) data["timestamp"] = time.time() else: data["timestamp"] = float(data["timestamp"]) if data["releasestr"] is None: - print "What should be the release name associated with this disc?" + print("What should be the release name associated with this disc?") data["releasestr"] = sys.stdin.readline()[:-1] if data["arch"] is None: - print "What arch is this disc for?" + print("What arch is this disc for?") data["arch"] = sys.stdin.readline()[:-1] if data["discNum"] is None and allDiscs is None: - print >> sys.stderr, "No disc number specified; assuming disc 1" + print("No disc number specified; assuming disc 1", file=sys.stderr) data["discNum"] = "1" if data["outfile"] is None: diff --git a/scripts/maketreeinfo.py b/scripts/maketreeinfo.py index c53a672ea..573e76fbc 100644 --- a/scripts/maketreeinfo.py +++ b/scripts/maketreeinfo.py @@ -30,7 +30,7 @@ def usage(): args = "" for key in data: args = "%s [--%s=%s]" %(args, key, key) - print "%s: %s" % (sys.argv[0], args) + print("%s: %s" % (sys.argv[0], args)) sys.exit(1) # TODO: add composeid, images, etc. @@ -54,7 +54,7 @@ opts.append("allDiscs") (args, extra) = getopt.getopt(sys.argv[1:], '', opts) if len(extra) > 0: - print "had extra args: %s" % extra + print("had extra args: %s" % extra) usage() for (str, arg) in args: @@ -63,7 +63,7 @@ for (str, arg) in args: elif str == "--allDiscs": allDiscs = 1 else: - print "unknown str of ", str + print("unknown str of ", str) usage() # Make sure timestamp is actually a float @@ -71,31 +71,31 @@ if type(data["timestamp"]) != float: data["timestamp"] = float(data["timestamp"]) if data["family"] is None: - print >> sys.stderr, "--family missing! This is probably bad!" + print("--family missing! This is probably bad!", file=sys.stderr) data["family"] = "" if data["variant"] is None: - print >> sys.stderr, "--variant missing, but that's OK." + print("--variant missing, but that's OK.", file=sys.stderr) data["variant"] = "" if data["version"] is None: - print >> sys.stderr, "--version missing! This is probably bad!" + print("--version missing! This is probably bad!", file=sys.stderr) data["version"] = "" if data["arch"] is None: - print >> sys.stderr, "--arch missing! This is probably bad!" + print("--arch missing! This is probably bad!", file=sys.stderr) data["arch"] = "" if data["discnum"] is None and allDiscs is None: - print >> sys.stderr, "--discnum missing; assuming disc 1" + print("--discnum missing; assuming disc 1", file=sys.stderr) data["discnum"] = "1" if data["totaldiscs"] is None and allDiscs is None: - print >> sys.stderr, "--totaldiscs missing; assuming 1" + print("--totaldiscs missing; assuming 1", file=sys.stderr) data["totaldiscs"] = "1" if data["packagedir"] is None: - print >> sys.stderr, "--packagedir missing. This might cause some weirdness." + print("--packagedir missing. This might cause some weirdness.", file=sys.stderr) data["packagedir"] = "" |
