new prints ascii decode error

Bug #1514981 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
reno
Fix Released
Undecided
Brant Knudson

Bug Description

`reno new` prints an error before it creates the file:

$ .tox/venv/bin/reno new keystone-change-3
ERROR: 'ascii' codec can't decode byte 0xc6 in position 0: ordinal not in range(128)
Created new notes file in releasenotes/notes/keystone-change-3-af64d3a8dafe14e0.yaml

Revision history for this message
Brant Knudson (blk-u) wrote :
Changed in reno:
assignee: nobody → Brant Knudson (blk-u)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to reno (master)

Reviewed: https://review.openstack.org/243816
Committed: https://git.openstack.org/cgit/openstack/reno/commit/?id=0feb86ecbb0b77a83da42a5a5add959c7834ffff
Submitter: Jenkins
Branch: master

commit 0feb86ecbb0b77a83da42a5a5add959c7834ffff
Author: Brant Knudson <email address hidden>
Date: Tue Nov 10 14:23:21 2015 -0600

    Fix unicode handling in get_random_string

    get_random_string would often fail in decoding the result of
    os.urandom. It would fail because the result of urandom is a bunch
    of random bytes and not valid text (i.e., not a valid utf-8
    representation).

    Turns out that it's unnecessary to decode the result of os.urandom.
    It returns six.binary_type whether on py2 or py3, and
    binascii.hexlify() takes a six.binary_type as the argument.

    binascii.hexlify() returns six.binary_type and we want
    get_random_string() to return six.text_type, so convert.

    Also, fixed the docstrings to use """.

    Closes-Bug: 1514981
    Change-Id: I60c31f2c47614beb3ed3c143d7815fdc15f5a0e0

Changed in reno:
status: New → Fix Committed
Changed in reno:
milestone: none → 1.0.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.