/srv/irclogs.ubuntu.com/2012/10/03/#ubuntu-nz.txt

ajmitchhads: I'd like to go, maybe I'll have to see if I can stay at my sister's place :)03:23
* ibeardslee just had the word from above .. it'd have to be under my own steam03:24
ajmitchshame03:24
ibeardsleeaye03:25
ajmitchticket+accomodation+travel+days off work tends to add up a bit03:25
* ibeardslee really needs to find more interesting things to talk about03:26
ojwbpossible tip - osdc last year was in canberra and from wellington i found it was much cheaper (and actually quicker) to fly to sydney and get the bus which runs from sydney airport to central canberra03:28
ojwbi saw something suggesting there might be direct flights by lca though03:28
ojwbwhich would at least make that a slower option03:29
ajmitchojwb: yeah I've taken the bus from sydney airport before, it often works out pretty cheap03:32
ojwbthe one annoying feature is it's cheaper if you say exactly which bus you'll be on, which is a bit hard to predict with customs, etc03:33
ajmitchunless you want to wait around for some time03:33
* ajmitch has always found australian customs to be fairly quick03:33
ojwbyeah, usually isn't bad, but it'd be annoying to have to buy a whole new ticket03:34
ajmitchdo you have a NZ passport?03:35
ajmitchin the last few years it's been made quicker with the automation, you don't really need to talk to a customs person03:36
ojwbno, uk one03:36
ojwbnot quite been here long enough to get an nz one03:36
hadsIt does add up, ticket price is only a moderate percentage.03:45
hadsI've missed the last two though so wasn't missing a third.03:45
Gajmitch: Customs is only quicker etc, if you have absolutely nothing to declare, living rurally throws that out of the water so to speak05:35
G30-60 minutes in customs hall at Brisbane last time (includes the queue when I arrived in school holidays morning), vs straight through the MAF checkpoint at Auckland at 11:30pm with quite a few others05:37
ojwbMAF seemed very slack coming in a few months back05:59
ojwbno interest in walking boots at all05:59
Gojwb: I have my entry to Australia routine down good "yeah, I live on a farm, but nothing I've got in my bag has been on the farmland, only the driveway" they umm and ahhh for a minute then decide to just put me through the dog queue08:39
ibeardsleemorning19:13
Atamiramorning19:20
Atamiraraining up here19:20
ibeardsleesupposed to be raining here this morning19:24
ibeardsleehaven't seen it yet19:24
ojwbmorning19:28
mwhudsonmorning19:39
ajmitchmorning19:48
chiltsmorning20:25
ojwbevery time I go to report a bug in ubuntu I find it harder to find the link20:27
ojwbaha - https://bugs.launchpad.net/ubuntu/+filebug/?no-redirect20:28
thomilifeless: you around? Got a minute to answer some questions about testtools & unicode?23:19
thomiI'm trying to figure out what I have to do to make testtools work with an assertion message that contains unicode characters, currently I get this: http://pastebin.ubuntu.com/1259064/23:21
lifelessthomi: ok, so thats not testools thats blowing up :)23:22
lifelessUnicodeDecodeError: 'ascii' codec can't decode byte 0xa1 in position 425: ordinal not in range(128)23:22
lifelessnote that its a *decode* error,23:23
lifelessbut the line of code referenced is doing an *encode* operation.23:23
thomi... huh23:23
lifelessthomi: you have a bytestring (type(foo) is str), which is non-ascii, and is being passed in to a thing that is expecting a string (type(foo) is unicode))23:24
thomihmmm23:24
lifelessthomi: I bet you that if you put a debug statement there, or run under pdb or something23:24
lifeless you'll find text is a str, not unicode23:24
thomihmmmm23:25
lifelessthomi: now, testtools can deal with arbitrary binary data, but you're in the text attachment codepath23:25
thomiahhhh23:25
lifelessbecause backtraces are strings, not bytestrings (normally)23:25
thomithe penny drops!23:25
lifelessthomi: note that if you do this: raise MyException(u"foo\x8")23:25
lifelessunder python2.x23:25
lifelessyou'll fuck things up royally23:26
thomiyeah, I'm attaching content using text_content23:26
thomi...which, n this test, will have odd unicode characters in it, and I'm using bytestrings :(23:26
lifelessbecause python2 's __unicode__ and __str__ for Exception is broken.23:26
lifelessthomi: so, either attach them as non-text23:26
lifelessthomi: or attach them as text_content with actual strings, not bytestrings23:27
thomithis is python 2, so my understanding is that there's just str and unicode, right?23:27
lifelesseffectively23:28
lifelessthere is a bytes type in 2.7, but its just an alias to str23:29
lifelessso its not terribly useful in catching confused types early.23:29
lifelessthomi: can you paste the attaching code?23:29
thomisure, I was using this:23:30
thomistdout, stderr = process.communicate()23:30
thomiself.addDetail('stdout', text_content(stdout))23:30
thomiwhere 'process' is a subprocess.Popen object23:30
lifelessah yes, so thats not going to work so well :)23:47
lifelessas it could be anything ;>23:47
lifelessyou can either decode stdout23:48
lifelessif you know, for instance, that its utf823:48
lifelessstdout = stdout.decode('utf8')23:48
lifelessthen it will be text that you're adding23:48
lifelessor you can use the lower level layers to add what you've got with a more conservative encoding (e.g. cp1280 or whatever it is that accepts 256 bytes as legitimate, never crashes.23:49
lifelessthomi: e.g.23:50
lifelessself.addDetail('stdout', Content(ContentType('text', 'plain', {'charset': 'iso-8859-1'}), lambda:[stdout]))23:52
thomilifeless: cool, that works - thanks :)23:55
lifelessthomi: np23:56

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!