1 |
On 10/28/2015 04:44 AM, Alexander Berntsen wrote: |
2 |
> Sheesh. That expression barely fits in a tweet. ;) Please just use |
3 |
> intermediate statements or an if or something. Otherwise LGTM. |
4 |
|
5 |
I've split it with an if, and also eliminated a redundant comparison |
6 |
since long(cache_mtime) == mydir_stat.st_mtime implies that |
7 |
mydir_stat.st_mtime == mydir_stat[stat.ST_MTIME], so here's what I've |
8 |
pushed: |
9 |
|
10 |
if cache_mtime == mydir_stat.st_mtime: |
11 |
cache_valid = True |
12 |
|
13 |
# Handle truncated mtime in order to avoid cache |
14 |
# invalidation for livecd squashfs (bug 564222). |
15 |
elif long(cache_mtime) == mydir_stat.st_mtime: |
16 |
cache_valid = True |
17 |
|
18 |
-- |
19 |
Thanks, |
20 |
Zac |