diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 16:31:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-16 23:32:39 +0100 |
commit | 1fc840ffc0267ecf3a15c4a59ab44869ef1d6339 (patch) | |
tree | b2932a0d0d7146bde799db47497236063050fc84 /meta/lib/oe/prservice.py | |
parent | 22c8ed6484e0ee9328e3844c9e794f3d89ebb9f7 (diff) | |
download | poky-1fc840ffc0267ecf3a15c4a59ab44869ef1d6339.tar.gz |
meta: python3 megapatch
This needs splutting into smaller units, WIP atm.
(From OE-Core rev: 21529228a7dca96a6a1b44ed9380c523efdeeb3e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/prservice.py')
-rw-r--r-- | meta/lib/oe/prservice.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py index b0cbcb1fbc..0054f954cc 100644 --- a/meta/lib/oe/prservice.py +++ b/meta/lib/oe/prservice.py | |||
@@ -1,7 +1,7 @@ | |||
1 | 1 | ||
2 | def prserv_make_conn(d, check = False): | 2 | def prserv_make_conn(d, check = False): |
3 | import prserv.serv | 3 | import prserv.serv |
4 | host_params = filter(None, (d.getVar("PRSERV_HOST", True) or '').split(':')) | 4 | host_params = list([_f for _f in (d.getVar("PRSERV_HOST", True) or '').split(':') if _f]) |
5 | try: | 5 | try: |
6 | conn = None | 6 | conn = None |
7 | conn = prserv.serv.PRServerConnection(host_params[0], int(host_params[1])) | 7 | conn = prserv.serv.PRServerConnection(host_params[0], int(host_params[1])) |
@@ -9,7 +9,7 @@ def prserv_make_conn(d, check = False): | |||
9 | if not conn.ping(): | 9 | if not conn.ping(): |
10 | raise Exception('service not available') | 10 | raise Exception('service not available') |
11 | d.setVar("__PRSERV_CONN",conn) | 11 | d.setVar("__PRSERV_CONN",conn) |
12 | except Exception, exc: | 12 | except Exception as exc: |
13 | bb.fatal("Connecting to PR service %s:%s failed: %s" % (host_params[0], host_params[1], str(exc))) | 13 | bb.fatal("Connecting to PR service %s:%s failed: %s" % (host_params[0], host_params[1], str(exc))) |
14 | 14 | ||
15 | return conn | 15 | return conn |
@@ -114,7 +114,7 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False): | |||
114 | bb.utils.unlockfile(lf) | 114 | bb.utils.unlockfile(lf) |
115 | 115 | ||
116 | def prserv_check_avail(d): | 116 | def prserv_check_avail(d): |
117 | host_params = filter(None, (d.getVar("PRSERV_HOST", True) or '').split(':')) | 117 | host_params = list([_f for _f in (d.getVar("PRSERV_HOST", True) or '').split(':') if _f]) |
118 | try: | 118 | try: |
119 | if len(host_params) != 2: | 119 | if len(host_params) != 2: |
120 | raise TypeError | 120 | raise TypeError |