[oe-commits] [bitbake] branch python3 updated: bitbake-layers py3 fixup

git at git.openembedded.org git at git.openembedded.org
Thu May 12 23:10:27 UTC 2016


rpurdie pushed a commit to branch python3
in repository bitbake.

The following commit(s) were added to refs/heads/python3 by this push:
       new  9bf3d09   bitbake-layers py3 fixup
9bf3d09 is described below

commit 9bf3d0954d2ab2bb848a113e3753bd0e90a56b14
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri May 13 00:07:54 2016 +0100

    bitbake-layers py3 fixup
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 bin/bitbake-layers | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/bin/bitbake-layers b/bin/bitbake-layers
index 01b23c8..9d397e9 100755
--- a/bin/bitbake-layers
+++ b/bin/bitbake-layers
@@ -27,7 +27,7 @@ import fnmatch
 from collections import defaultdict
 import argparse
 import re
-import httplib, urlparse, json
+import http.client, urllib.parse, json
 import subprocess
 
 bindir = os.path.dirname(__file__)
@@ -68,7 +68,7 @@ class Commands():
             self.bblayers = (self.bbhandler.config_data.getVar('BBLAYERS', True) or "").split()
             self.bbhandler.prepare(config_only)
             layerconfs = self.bbhandler.config_data.varhistory.get_variable_items_files('BBFILE_COLLECTIONS', self.bbhandler.config_data)
-            self.bbfile_collections = {layer: os.path.dirname(os.path.dirname(path)) for layer, path in layerconfs.iteritems()}
+            self.bbfile_collections = {layer: os.path.dirname(os.path.dirname(path)) for layer, path in layerconfs.items()}
 
 
     def do_show_layers(self, args):
@@ -134,11 +134,11 @@ Removes the specified layer from bblayers.conf
     def get_json_data(self, apiurl):
         proxy_settings = os.environ.get("http_proxy", None)
         conn = None
-        _parsedurl = urlparse.urlparse(apiurl)
+        _parsedurl = urllib.parse.urlparse(apiurl)
         path = _parsedurl.path
         query = _parsedurl.query
         def parse_url(url):
-            parsedurl = urlparse.urlparse(url)
+            parsedurl = urllib.parse.urlparse(url)
             if parsedurl.netloc[0] == '[':
                 host, port = parsedurl.netloc[1:].split(']', 1)
                 if ':' in port:
@@ -155,11 +155,11 @@ Removes the specified layer from bblayers.conf
 
         if proxy_settings is None:
             host, port = parse_url(apiurl)
-            conn = httplib.HTTPConnection(host, port)
+            conn = http.client.HTTPConnection(host, port)
             conn.request("GET", path + "?" + query)
         else:
             host, port = parse_url(proxy_settings)
-            conn = httplib.HTTPConnection(host, port)
+            conn = http.client.HTTPConnection(host, port)
             conn.request("GET", apiurl)
 
         r = conn.getresponse()
@@ -632,7 +632,7 @@ build results (as the layer priority order has effectively changed).
         applied_appends = []
         for layer in layers:
             overlayed = []
-            for f in self.bbhandler.cooker.collection.overlayed.iterkeys():
+            for f in self.bbhandler.cooker.collection.overlayed.keys():
                 for of in self.bbhandler.cooker.collection.overlayed[f]:
                     if of.startswith(layer):
                         overlayed.append(of)
@@ -777,7 +777,7 @@ Lists recipes with the bbappends that apply to them as subitems.
 
     def show_appends_for_skipped(self):
         filenames = [os.path.basename(f)
-                    for f in self.bbhandler.cooker.skiplist.iterkeys()]
+                    for f in self.bbhandler.cooker.skiplist.keys()]
         return self.show_appends_output(filenames, None, " (skipped)")
 
     def show_appends_output(self, filenames, best_filename, name_suffix = ''):
@@ -1006,6 +1006,7 @@ def main():
     parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
     parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
     subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>')
+    subparsers.required = True
 
     parser_show_layers = add_command('show-layers', cmds.do_show_layers)
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list