Code review comment for lp:~rvb/maas/update-sst

Revision history for this message
Raphaƫl Badin (rvb) wrote :

> \o/
>
>
> [1]
>
> + project_home = os.path.dirname(
> + os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
>
> There's a slightly more succinct way of doing this:
>
> from os.path import join, pardir, dirname
> project_home = join(pardir, pardir, pardir, dirname(__file__))
>
> Also, I tend to import from os.path, or path from os, though that's no
> reason you should too. I'm too lazy to type or read os.path.thing all
> the time :)

Thanks for the review.

I like "dirname(dirname(dirname(dirname(__file__))))" better but I've moved project_home as a module level variable.

« Back to merge proposal