src/m/o/motools-HEAD/gnat/examples/trackuri.py motools(Download)
import os
import os.path
import logging
from logging import log, error, warning, info, debug
sys.path.append(os.path.abspath("")+"/../src/gnat/")
src/z/e/zero-install-HEAD/releases/0launch/injector-0.26/zeroinstall/injector/policy.py zero-install(Download)
import time import sys, os, sets from logging import info, debug, warn import arch from model import *
if fetch_stale_interfaces and self.network_use != network_offline:
for stale in self.stale_feeds:
info("Checking for updates to stale feed %s", stale)
self.begin_iface_download(stale, False)
for w in self.watchers: w()
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an interface as an icon or implementation as well, and some of the code
# assumes it's OK keep asking for the same interface to be downloaded.
info("Already have a handler for %s; not adding another", interface)
return
def feed_downloaded(stream):
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
src/z/e/zero-install-HEAD/releases/0launch/injector-0.30/zeroinstall/injector/policy.py zero-install(Download)
import time import sys, os, sets from logging import info, debug, warn import arch from model import *
if fetch_stale_interfaces and self.network_use != network_offline:
for stale in self.stale_feeds:
info("Checking for updates to stale feed %s", stale)
self.begin_iface_download(stale, False)
for w in self.watchers: w()
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
src/z/e/zero-install-HEAD/releases/0launch/injector-0.29/zeroinstall/injector/policy.py zero-install(Download)
import time import sys, os, sets from logging import info, debug, warn import arch from model import *
if fetch_stale_interfaces and self.network_use != network_offline:
for stale in self.stale_feeds:
info("Checking for updates to stale feed %s", stale)
self.begin_iface_download(stale, False)
for w in self.watchers: w()
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
src/z/e/zero-install-HEAD/releases/0launch/injector-0.28/zeroinstall/injector/policy.py zero-install(Download)
import time import sys, os, sets from logging import info, debug, warn import arch from model import *
if fetch_stale_interfaces and self.network_use != network_offline:
for stale in self.stale_feeds:
info("Checking for updates to stale feed %s", stale)
self.begin_iface_download(stale, False)
for w in self.watchers: w()
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
src/z/e/zero-install-HEAD/releases/0launch/injector-0.27/zeroinstall/injector/policy.py zero-install(Download)
import time import sys, os, sets from logging import info, debug, warn import arch from model import *
if fetch_stale_interfaces and self.network_use != network_offline:
for stale in self.stale_feeds:
info("Checking for updates to stale feed %s", stale)
self.begin_iface_download(stale, False)
for w in self.watchers: w()
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
src/z/e/zero-install-HEAD/releases/0launch/injector-0.25/zeroinstall/injector/policy.py zero-install(Download)
import time import sys, os from logging import info, debug, warn import arch from model import *
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an interface as an icon or implementation as well, and some of the code
# assumes it's OK keep asking for the same interface to be downloaded.
info("Already have a handler for %s; not adding another", interface)
return
def feed_downloaded(stream):
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
src/z/e/zero-install-HEAD/releases/0launch/injector-0.24/zeroinstall/injector/policy.py zero-install(Download)
import time import sys, os from logging import info, debug, warn import arch from model import *
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an interface as an icon or implementation as well, and some of the code
# assumes it's OK keep asking for the same interface to be downloaded.
info("Already have a handler for %s; not adding another", interface)
return
dl.on_success.append(lambda stream:
iface_cache.check_signed_data(interface, stream, self.handler))
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
src/z/e/zero-install-HEAD/releases/0launch/injector-0.23/zeroinstall/injector/policy.py zero-install(Download)
# Copyright (C) 2006, Thomas Leonard # See the README file for details, or visit http://0install.net. import time import sys, os from logging import info, debug, warn import arch
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an interface as an icon or implementation as well, and some of the code
# assumes it's OK keep asking for the same interface to be downloaded.
info("Already have a handler for %s; not adding another", interface)
return
dl.on_success.append(lambda stream:
iface_cache.check_signed_data(interface, stream, self.handler))
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
src/z/e/zero-install-HEAD/releases/0launch/injector-0.22/zeroinstall/injector/policy.py zero-install(Download)
# Copyright (C) 2006, Thomas Leonard # See the README file for details, or visit http://0install.net. import time import sys, os from logging import info, debug, warn import arch
debug("get_best_implementation(%s), with feeds: %s", iface, iface.feeds)
if not impls:
info("Interface %s has no implementations!", iface)
return None
best = impls[0]
for x in impls[1:]:
if self.compare(iface, x, best) < 0:
best = x
unusable = self.get_unusable_reason(best, self.restrictions.get(iface, []))
if unusable:
info("Best implementation of %s is %s, but unusable (%s)", iface, best, unusable)
debug("Nothing known about interface, but we are off-line.")
else:
if iface.feeds:
info("Nothing known about interface '%s' and off-line. Trying feeds only.", uri)
else:
warn("Nothing known about interface '%s', but we are in off-line mode "
"(so not fetching).", uri)
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an interface as an icon or implementation as well, and some of the code
# assumes it's OK keep asking for the same interface to be downloaded.
info("Already have a handler for %s; not adding another", interface)
return
dl.on_success.append(lambda stream:
iface_cache.check_signed_data(interface, stream, self.handler))
break
warn('Missing "href" attribute on <icon> in %s', interface)
else:
info('No PNG icons found in %s', interface)
return
dl = self.handler.get_download(source, force = force)
if dl.on_success:
# Possibly we should handle this better, but it's unlikely anyone will need
# to use an icon as an interface or implementation as well, and some of the code
# may assume it's OK keep asking for the same icon to be downloaded.
info("Already have a handler for %s; not adding another", source)
return path
if self.network_use == network_offline:
info("No icon present for %s, but off-line so not downloading", iface)
return None
self.begin_icon_download(iface)
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next