• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(1605)  |  Call(1319)  |  Derive(0)  |  Import(286)
Log a message with severity 'WARNING' on the root logger.

        def warning(msg, *args, **kwargs):
    """
    Log a message with severity 'WARNING' on the root logger.
    """
    if len(root.handlers) == 0:
        basicConfig()
    root.warning(msg, *args, **kwargs)
        


src/v/e/vertebra-py-HEAD/lib/vertebra/scheduler/scheduler.py   vertebra-py(Download)
from select import select
from vertebra.util import StablePrioQueue,Full,Empty
from weakref import ref,WeakKeyDictionary,WeakValueDictionary
from logging import warn,error,debug
from vertebra.scheduler.sentinel import BaseSentinelHandler
from vertebra.scheduler.handler import Handler,NoneHandler,ExceptionHandler
from vertebra.scheduler.task import TaskHandler,Task
            if handler.handle(self,task,ret):
              return
          except:
            warn("handler %s crashed handling %s from %s",
                 handler,ret,task,exc_info=True)
      warn("unhandled %s from %s",ret,task)
      return

src/v/e/vertebra-py-HEAD/lib/vertebra/scheduler/handler.py   vertebra-py(Download)
from logging import warn
 
class Handler(object):
  TYPES = () # NOTE: THIS MUST BE A TUPLE, NO LISTS!
 
  def handle(self,scheduler,task,ret): # returns True if handled
    return False
 
class NoneHandler(Handler):
  TYPES = ( type(None), )
 
  def handle(self,scheduler,task,nothin):
    warn("%r task %r didn't return any instructions, cancelled",
  def handle(self,scheduler,task,exc):
    warn("%r: task %r raised exception %r",scheduler,task,exc,exc_info=True)
 

src/v/e/vertebra-py-HEAD/lib/vertebra/agent.py   vertebra-py(Download)
from __future__ import with_statement
from threading import Thread,Condition
from vertebra.job import job
from vertebra.config import config
from logging import debug,info,warn
from types import ModuleType,StringTypes
import fibra
  def recv(self,msg):
    warn("can't handle message: %r" % msg)
 
class agent(base_agent):
  """Vertebra Agent Implementation"""
  def __init__(self):
    super(agent,self).__init__()
      try:
        self.load_actor(actor)
      except:
        warn("unable to load %s",actor,exc_info=True)
    info("done loading actors")
 
    # Start Communications

src/v/e/vertebra-py-HEAD/lib/vertebra/conn/base.py   vertebra-py(Download)
"""
 
from threading import Thread,currentThread
from logging import debug,info,error,warn
from time import sleep
from socket import error as socket_error
from backoff import exponential_backoff
  def recv(self,rawmsg):
    try:
      u = self.codec.unmarshall(rawmsg)
    except MarshalError:
      warn("failed to unmarshall raw message %s",rawmsg,exc_info=True)
    else:
      r = self.router
  def sink(self,X):
    warn('sinking unused data: %r',X)
    return True
 
class threadedConnection(baseConnection):
  def setup(self,config,name="ThreadedConnection"):
    super(threadedConnection,self).setup(config,name)

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 *
				self.freshness = int(config.get('global', 'freshness'))
				assert self.network_use in network_levels
			except Exception, ex:
				warn("Error loading config: %s", ex)
 
		self.set_root(root)
 
		def process(dep):
			iface = self.get_interface(dep.interface)
			if iface in self.implementation:
				debug("Interface requested twice; skipping second %s", iface)
				if dep.restrictions:
					warn("Interface requested twice; I've already chosen an implementation "
						"of '%s' but there are more restrictions! Ignoring the second set.", iface)
			try:
				feed_iface = self.get_interface(f.uri)
				if feed_iface.name and iface.uri not in feed_iface.feed_for:
					warn("Missing <feed-for> for '%s' in '%s'",
						iface.uri, f.uri)
				if feed_iface.implementations:
					impls.extend(feed_iface.implementations.values())
			except NeedDownload, ex:
				raise ex
			except Exception, ex:
				warn("Failed to load feed %s for %s: %s",
					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)
						self._warned_offline = True
		elif not uri.startswith('/'):
			source = icon.getAttribute('href')
			if source:
				break
			warn('Missing "href" attribute on <icon> in %s', interface)
		else:
			info('No PNG icons found in %s', interface)
			return
		feed_targets = feed_iface.feed_for
		debug("Feed targets: %s", feed_targets)
		if not feed_iface.name:
			warn("Warning: unknown interface '%s'" % feed_iface_uri)
		return [iface_cache.get_interface(uri) for uri in feed_targets]
 
	def get_icon_path(self, 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 *
				self.freshness = int(config.get('global', 'freshness'))
				assert self.network_use in network_levels
			except Exception, ex:
				warn("Error loading config: %s", ex)
 
		self.set_root(root)
 
		def process(dep):
			iface = self.get_interface(dep.interface)
			if iface in self.implementation:
				debug("Interface requested twice; skipping second %s", iface)
				if dep.restrictions:
					warn("Interface requested twice; I've already chosen an implementation "
						"of '%s' but there are more restrictions! Ignoring the second set.", iface)
			try:
				feed_iface = self.get_interface(f.uri)
				if feed_iface.name and iface.uri not in feed_iface.feed_for:
					warn("Missing <feed-for> for '%s' in '%s'",
						iface.uri, f.uri)
				if feed_iface.implementations:
					impls.extend(feed_iface.implementations.values())
			except NeedDownload, ex:
				raise ex
			except Exception, ex:
				warn("Failed to load feed %s for %s: %s",
					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)
						self._warned_offline = True
		elif not uri.startswith('/'):
			source = icon.getAttribute('href')
			if source:
				break
			warn('Missing "href" attribute on <icon> in %s', interface)
		else:
			info('No PNG icons found in %s', interface)
			return
		feed_targets = feed_iface.feed_for
		debug("Feed targets: %s", feed_targets)
		if not feed_iface.name:
			warn("Warning: unknown interface '%s'" % feed_iface_uri)
		return [iface_cache.get_interface(uri) for uri in feed_targets]
 
	def get_icon_path(self, 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 *
				self.freshness = int(config.get('global', 'freshness'))
				assert self.network_use in network_levels
			except Exception, ex:
				warn("Error loading config: %s", ex)
 
		self.set_root(root)
 
		def process(dep):
			iface = self.get_interface(dep.interface)
			if iface in self.implementation:
				debug("Interface requested twice; skipping second %s", iface)
				if dep.restrictions:
					warn("Interface requested twice; I've already chosen an implementation "
						"of '%s' but there are more restrictions! Ignoring the second set.", iface)
			try:
				feed_iface = self.get_interface(f.uri)
				if feed_iface.name and iface.uri not in feed_iface.feed_for:
					warn("Missing <feed-for> for '%s' in '%s'",
						iface.uri, f.uri)
				if feed_iface.implementations:
					impls.extend(feed_iface.implementations.values())
			except NeedDownload, ex:
				raise ex
			except Exception, ex:
				warn("Failed to load feed %s for %s: %s",
					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)
						self._warned_offline = True
		elif not uri.startswith('/'):
			source = icon.getAttribute('href')
			if source:
				break
			warn('Missing "href" attribute on <icon> in %s', interface)
		else:
			info('No PNG icons found in %s', interface)
			return
		feed_targets = feed_iface.feed_for
		debug("Feed targets: %s", feed_targets)
		if not feed_iface.name:
			warn("Warning: unknown interface '%s'" % feed_iface_uri)
		return [iface_cache.get_interface(uri) for uri in feed_targets]
 
	def get_icon_path(self, 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 *
				self.freshness = int(config.get('global', 'freshness'))
				assert self.network_use in network_levels
			except Exception, ex:
				warn("Error loading config: %s", ex)
 
		self.set_root(root)
 
		def process(dep):
			iface = self.get_interface(dep.interface)
			if iface in self.implementation:
				debug("Interface requested twice; skipping second %s", iface)
				if dep.restrictions:
					warn("Interface requested twice; I've already chosen an implementation "
						"of '%s' but there are more restrictions! Ignoring the second set.", iface)
			try:
				feed_iface = self.get_interface(f.uri)
				if feed_iface.name and iface.uri not in feed_iface.feed_for:
					warn("Missing <feed-for> for '%s' in '%s'",
						iface.uri, f.uri)
				if feed_iface.implementations:
					impls.extend(feed_iface.implementations.values())
			except NeedDownload, ex:
				raise ex
			except Exception, ex:
				warn("Failed to load feed %s for %s: %s",
					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)
						self._warned_offline = True
		elif not uri.startswith('/'):
			source = icon.getAttribute('href')
			if source:
				break
			warn('Missing "href" attribute on <icon> in %s', interface)
		else:
			info('No PNG icons found in %s', interface)
			return
		feed_targets = feed_iface.feed_for
		debug("Feed targets: %s", feed_targets)
		if not feed_iface.name:
			warn("Warning: unknown interface '%s'" % feed_iface_uri)
		return [iface_cache.get_interface(uri) for uri in feed_targets]
 
	def get_icon_path(self, iface):

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 *
				self.freshness = int(config.get('global', 'freshness'))
				assert self.network_use in network_levels
			except Exception, ex:
				warn("Error loading config: %s", ex)
 
		self.set_root(root)
 
		def process(dep):
			iface = self.get_interface(dep.interface)
			if iface in self.implementation:
				debug("Interface requested twice; skipping second %s", iface)
				if dep.restrictions:
					warn("Interface requested twice; I've already chosen an implementation "
						"of '%s' but there are more restrictions! Ignoring the second set.", iface)
			try:
				feed_iface = self.get_interface(f.uri)
				if feed_iface.name and iface.uri not in feed_iface.feed_for:
					warn("Missing <feed-for> for '%s' in '%s'",
						iface.uri, f.uri)
				if feed_iface.implementations:
					impls.extend(feed_iface.implementations.values())
			except NeedDownload, ex:
				raise ex
			except Exception, ex:
				warn("Failed to load feed %s for %s: %s",
					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)
						self._warned_offline = True
		elif not uri.startswith('/'):
			source = icon.getAttribute('href')
			if source:
				break
			warn('Missing "href" attribute on <icon> in %s', interface)
		else:
			info('No PNG icons found in %s', interface)
			return
		feed_targets = feed_iface.feed_for
		debug("Feed targets: %s", feed_targets)
		if not feed_iface.name:
			warn("Warning: unknown interface '%s'" % feed_iface_uri)
		return [iface_cache.get_interface(uri) for uri in feed_targets]
 
	def get_icon_path(self, 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 *
				self.freshness = int(config.get('global', 'freshness'))
				assert self.network_use in network_levels
			except Exception, ex:
				warn("Error loading config: %s", ex)
 
		self.set_root(root)
 
		def process(dep):
			iface = self.get_interface(dep.interface)
			if iface in self.implementation:
				debug("Interface requested twice; skipping second %s", iface)
				if dep.restrictions:
					warn("Interface requested twice; I've already chosen an implementation "
						"of '%s' but there are more restrictions! Ignoring the second set.", iface)
			try:
				feed_iface = self.get_interface(f.uri)
				if feed_iface.name and iface.uri not in feed_iface.feed_for:
					warn("Missing <feed-for> for '%s' in '%s'",
						iface.uri, f.uri)
				if feed_iface.implementations:
					impls.extend(feed_iface.implementations.values())
			except NeedDownload, ex:
				raise ex
			except Exception, ex:
				warn("Failed to load feed %s for %s: %s",
					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)
						self._warned_offline = True
		elif not uri.startswith('/'):
			source = icon.getAttribute('href')
			if source:
				break
			warn('Missing "href" attribute on <icon> in %s', interface)
		else:
			info('No PNG icons found in %s', interface)
			return
					"this interface can't be used as a feed." % feed_iface_uri)
		feed_targets = feed_iface.feed_for
		if not feed_iface.name:
			warn("Warning: unknown interface '%s'" % feed_iface_uri)
		return [self.get_interface(uri) for uri in feed_targets]
 
	def get_icon_path(self, iface):

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next