1 # Copyright (C) 2009, Thomas Leonard
2 # See the README file for details, or visit http://0install.net.
4 from zeroinstall
import support
6 def get_fetch_info(policy
, impl
):
7 """Get the text for a Fetch column."""
10 elif policy
.get_cached(impl
):
11 if impl
.id.startswith('/'):
13 elif impl
.id.startswith('package:'):
18 src
= policy
.fetcher
.get_best_source(impl
)
20 return support
.pretty_size(src
.size
)
22 return _('(unavailable)')