On Fri, Feb 19, 2016 at 11:12:46AM +0100, Marcus Schäfer wrote: > Hi Dave, > > I'm using your data structure generator for the next > generation of the kiwi project https://github.com/SUSE/kiwi > > Thanks for generateDS, this is really a great piece of code :)
Marcus, I appreciate the comment. I'm glad to hear that generateDS has been useful. > > For use with python3.4 it complained about bytes vs. strings > at a few places. Attached is a patch which fixes that for > me. > > Would be great if you can consider this in your next release. > I was not able to find a github repo or similar for the code > Thus I'm sending just the patch file Your patch worked fine, but see below. Thank you much for this fix. I've applied your patch and have done some testing. It looks good to me, ... but I have found a case where it causes an error, I believe, when run under Python 2. So, I'll fix this, and do some more testing. Then, your fix will be in the next release of generateDS. The publicly available repository for generateDS is at Bitbucket: https://bitbucket.org/dkuhlman/generateds. I'll pushed your fix to that repository, after some more testing. It's a Mercurial/hg repository. I followed your link, and read a bit about Kiwi. That sounds like a fascinating project. Does it enable you to generate custom Linux distributions for special applications? I normally use Ubuntu/Xubuntu Linux, but I also use Raspian Linux on the Raspberry Pi. (see: https://en.wikipedia.org/wiki/Raspberry_Pi) I use the Raspberry Pi as a terminal to access my other machines on my local network via ssh. Does Kiwi target the Raspberry Pi? That would be cool. Or, do I not understand what you are doing with Kiwi? Thanks again for that patch. Dave > > Thanks > > Regards, > Marcus > -- > Public Key available via: https://keybase.io > keybase search marcus_schaefer > ------------------------------------------------------- > Marcus Schäfer (Res. & Dev.) SUSE Linux GmbH > Tel: 0911-740 53 0 Maxfeldstrasse 5 > FAX: 0911-740 53 479 D-90409 Nürnberg > HRB: 21284 (AG Nürnberg) Germany > GF: Felix Imendörffer, Jane Smithard, Graham Norton > http://www.suse.de > ------------------------------------------------------- > --- generateDS.py.orig 2016-02-19 10:48:57.589446017 +0100 > +++ generateDS.py 2016-02-19 10:52:16.245923433 +0100 > @@ -6411,7 +6411,7 @@ > state = reduce( > operator.concat, > (str(id(item)) for item in PostponedExtensions)) > - sum = hashlib.sha1(str(state)).hexdigest() > + sum = hashlib.sha1(str(state).encode()).hexdigest() > if sum in LoopcheckOneperChecksums: > return False > LoopcheckOneperChecksums.add(sum) > --- process_includes.py.orig 2016-02-19 10:48:21.841350123 +0100 > +++ process_includes.py 2016-02-19 10:47:56.657282498 +0100 > @@ -238,7 +238,7 @@ > save_base_url = params.base_url > string_content = resolve_ref(child, params, options) > if string_content is not None: > - root = etree.fromstring(string_content, base_url=params.base_url) > + root = etree.fromstring(string_content.encode(), > base_url=params.base_url) > roots.append(root) > for child1 in root: > if not isinstance(child1, etree._Comment): -- Dave Kuhlman http://www.davekuhlman.org ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users