Roundup Tracker - Issues

Message7494

Author rouilj
Recipients marcus.priesch, rouilj, schlatterbeck
Date 2022-05-03.14:45:45
Message-id <20220503144545.274B16A0289@pe15.cs.umb.edu>
In-reply-to <20220503080423.cyerdijzaogfwdmc@runtux.com>
In message <20220503080423.cyerdijzaogfwdmc@runtux.com>,
Ralf Schlatterbeck writes:
>
>
>Ralf Schlatterbeck added the comment:
>
>On Mon, May 02, 2022 at 11:00:00PM +0000, John Rouillard wrote:
>> >Hmm, the directory is not existing: It is not supposed to: I've never
>> >installed roundup on that test-machine. So it is expected that the
>> >directory doesn't exist.
>> 
>> That's wierd because the code reads:
>[...]
>
>I think it's the code starting line 48:
>
># compute mo location relative to roundup installation directory
># (prefix/lib/python/site-packages/roundup/msgfmt.py on posix systems,
># prefix/lib/site-packages/roundup/msgfmt.py on windows).
># locale root is prefix/share/locale.
>if os.name == "nt":
>    _mo_path = [".."] * 4 + ["share", "locale"]
>else:
>    _mo_path = [".."] * 5 + ["share", "locale"]
>_mo_path = os.path.normpath(os.path.join(msgfmt.__file__, *_mo_path))
>if _mo_path not in LOCALE_DIRS:
>    LOCALE_DIRS.append(_mo_path)
>del _mo_path
>
>This subtracts 5 directory components from the filename on Linux and
>then appends /share/locale

and appends it blindly. Shouldn't there be a check to see if _mo_path
exists and is a directory?
History
Date User Action Args
2022-05-03 14:45:45rouiljsetrecipients: + rouilj, schlatterbeck, marcus.priesch
2022-05-03 14:45:45rouiljlinkissue2551200 messages
2022-05-03 14:45:45rouiljcreate