make metered more generic

Allow it to be used when the Key is not known.
This commit is contained in:
Joey Hess 2019-06-25 12:30:18 -04:00
parent 8355dba5cc
commit 26c54d6ea3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 39 additions and 22 deletions

View file

@ -360,7 +360,7 @@ downloadImport remote importtreeconfig importablecontents = do
Nothing -> return Nothing
checkDiskSpaceToGet tmpkey Nothing $
withTmp tmpkey $ \tmpfile ->
metered Nothing tmpkey (return Nothing) $
metered Nothing tmpkey $
const (rundownload tmpfile)
where
ia = Remote.importActions remote