diff options
author | W. Trevor King <wking@tremily.us> | 2013-01-23 20:56:57 -0500 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2013-01-23 20:56:57 -0500 |
commit | b9e5c33dc96da7255740cc23660a183baafbadd4 (patch) | |
tree | 0bdcb8497848fbede3821fc84340b10c8292867a /.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/7ec2c071-9630-42b0-b08a-9854616f9144/comments/f87fd684-6af1-498d-98d5-f915bcee76a9 | |
parent | 128a651dd55523d00095ea2669683e6cbb8a4259 (diff) | |
download | bugseverywhere-b9e5c33dc96da7255740cc23660a183baafbadd4.tar.gz |
storage:util:upgrade: Strip any trailing space from the version
Not just '\n'. Mark Mikofski reported an error on the upgrade from
1.4 to 1.5 on MS Windows:
> upgrading bugdir from "Bugs Everywhere Directory v1.4" to "Bugs Everywhere Directory v1.5"
> Traceback (most recent call last):
> ...
> File "c:\...\libbe\storage\util\upgrade.py", line 141, in check_initial_version
> assert version == self.initial_version, '%s: %s' % (path, version)
> AssertionError: c:\...\.be\version: Bugs Everywhere Directory v1.4
>
> **notes:** I set a breakpoint and it does seem that they are not the same
> (Pdb) self.initial_version
> 'Bugs Everywhere Directory v1.4'
> (Pdb) version
> u'Bugs Everywhere Directory v1.4\r'
We don't need to convert to Unicode, because on Python 2.7:
$ python2.7 -c "print('a' == u'a')"
True
Strange, but true ;). One day we'll migrate BE to Python 3...
Diffstat (limited to '.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/7ec2c071-9630-42b0-b08a-9854616f9144/comments/f87fd684-6af1-498d-98d5-f915bcee76a9')
0 files changed, 0 insertions, 0 deletions