Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "André Erdmann" <dywi@mailerd.de>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 01/13] autobuild-run, python3: print is a function
Date: Wed, 25 Feb 2015 22:17:18 +0100	[thread overview]
Message-ID: <1424899050-24932-2-git-send-email-dywi@mailerd.de> (raw)
In-Reply-To: <1424899050-24932-1-git-send-email-dywi@mailerd.de>

Commands used for editing:
  2to ./scripts/autobuild-run -f print -w

Py2k compatibility: via __future__ import

Signed-off-by: Andr? Erdmann <dywi@mailerd.de>
---
 scripts/autobuild-run | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index a75006f..2354893 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -57,6 +57,8 @@
 #   BR2_PACKAGE_CLASSPATH=y, improve the script to detect whether the
 #   necessary host machine requirements are there to build classpath.
 
+from __future__ import print_function
+
 import urllib2
 import csv
 from random import randint
@@ -82,7 +84,7 @@ def check_version():
     r = urllib2.urlopen('http://autobuild.buildroot.org/version')
     version = int(r.readline().strip())
     if version > VERSION:
-        print "ERROR: script version too old, please upgrade."
+        print("ERROR: script version too old, please upgrade.")
         sys.exit(1)
 
 def check_requirements(http_login, http_password):
@@ -96,7 +98,7 @@ def check_requirements(http_login, http_password):
     for prog in needed_progs:
         ret = subprocess.call(["which", prog], stdout=devnull, stderr=devnull)
         if ret != 0:
-            print "ERROR: your system lacks the '%s' program" % prog
+            print("ERROR: your system lacks the '%s' program" % prog)
             missing_requirements = True
 
     if missing_requirements:
@@ -576,11 +578,11 @@ Format of the configuration file:
 
     if args.config:
         if not os.path.exists(args.config):
-            print "ERROR: configuration file %s does not exist" % args.config
+            print("ERROR: configuration file %s does not exist" % args.config)
             sys.exit(1)
         parser = ConfigParser.RawConfigParser()
         if not parser.read([args.config]):
-            print "ERROR: cannot parse configuration file %s" % args.config
+            print("ERROR: cannot parse configuration file %s" % args.config)
             sys.exit(1)
         if parser.has_option('main', 'ninstances'):
             ninstances = parser.getint('main', 'ninstances')
@@ -608,8 +610,8 @@ def main():
     (ninstances, njobs, http_login, http_password, submitter) = config_get()
     check_requirements(http_login, http_password)
     if http_login is None or http_password is None:
-        print "WARN: due to the lack of http login/password details, results will not be submitted"
-        print "WARN: tarballs of results will be kept locally only"
+        print("WARN: due to the lack of http login/password details, results will not be submitted")
+        print("WARN: tarballs of results will be kept locally only")
     def sigterm_handler(signum, frame):
         os.killpg(os.getpgid(os.getpid()), signal.SIGTERM)
         sys.exit(1)
-- 
2.3.0

  reply	other threads:[~2015-02-25 21:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 21:17 [Buildroot] [PATCH 00/13] autobuild-run: python3 compat and misc improvements André Erdmann
2015-02-25 21:17 ` André Erdmann [this message]
2015-02-25 21:17 ` [Buildroot] [PATCH 02/13] autobuild-run, python3: urllib.request<>urllib2 André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 03/13] autobuild-run, python3: bytes<>str, decode() André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 04/13] autobuild-run, python3: configparser<>ConfigParser André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 05/13] autobuild-run: remove unneeded vars André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 06/13] autobuild-run: explicitly close web file handles André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 07/13] autobuild-run: get host arch once André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 08/13] autobuild-run: sort imports alphabetically André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 09/13] autobuild-run: unify "which <prog>" code André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 10/13] autobuild-run: use a built-in has_prog() implementation André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 11/13] autobuild-run: move check_requirements() to SystemInfo André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 12/13] autobuild-run: encapsulate subprocess calls André Erdmann
2015-02-25 21:17 ` [Buildroot] [PATCH 13/13] autobuild-run: set locale to en_US or C André Erdmann
2015-02-26 10:08 ` [Buildroot] [PATCH 00/13] autobuild-run: python3 compat and misc improvements Thomas Petazzoni
2015-02-26 19:25   ` Thomas De Schampheleire
2015-03-01  0:09     ` André Erdmann
2015-03-01 21:17       ` Thomas De Schampheleire
2015-03-01 21:37         ` André Erdmann
2015-03-01 21:52           ` Thomas De Schampheleire
2015-03-02  8:36             ` Thomas Petazzoni
2015-03-02 20:00               ` André Erdmann
2015-03-15 13:36 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424899050-24932-2-git-send-email-dywi@mailerd.de \
    --to=dywi@mailerd.de \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox