diff options
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 |