Did I find the right examples for you? yes no

All Samples(810)  |  Call(460)  |  Derive(350)  |  Import(0)
Base class for warnings generated by user code.

src/m/o/modern-python-example-HEAD/lib/python2.7/site-packages/logilab/common/shellutils.py   modern-python-example(Download)
                    age = (time.time() - os.stat(lock_file)[stat.ST_MTIME])
                    if age / max_delay > 1 :
                        raise UserWarning("Command '%s' (pid %s) has locked the "
                                          "file '%s' for %s minutes"
                                          % (pi.name(), pid, lock_file, age/60))

src/h/e/heroku-playframework-HEAD/play-1.2.2RC1/modules/scala-0.9.1/samples-and-tests/i-am-a-developer/mechanize/_util.py   heroku-playframework(Download)
class ExperimentalWarning(UserWarning):
    pass
 
def experimental(message):
    warnings.warn(message, ExperimentalWarning, stacklevel=3)

src/l/a/landline-server-HEAD/co.whatisuplabs.ldln/lib/play/samples-and-tests/i-am-a-developer/mechanize/_util.py   landline-server(Download)
class ExperimentalWarning(UserWarning):
    pass
 
def experimental(message):
    warnings.warn(message, ExperimentalWarning, stacklevel=3)

src/p/u/pureplay-HEAD/modules/scala-0.7.3/samples-and-tests/i-am-a-developer/mechanize/_util.py   pureplay(Download)
class ExperimentalWarning(UserWarning):
    pass
 
def experimental(message):
    warnings.warn(message, ExperimentalWarning, stacklevel=3)

src/h/e/heroku-playframework-HEAD/play-1.2.2RC1/samples-and-tests/i-am-a-developer/mechanize/_util.py   heroku-playframework(Download)
class ExperimentalWarning(UserWarning):
    pass
 
def experimental(message):
    warnings.warn(message, ExperimentalWarning, stacklevel=3)

src/r/e/restcommander-HEAD/play-1.2.4/samples-and-tests/i-am-a-developer/mechanize/_util.py   restcommander(Download)
class ExperimentalWarning(UserWarning):
    pass
 
def experimental(message):
    warnings.warn(message, ExperimentalWarning, stacklevel=3)

src/p/u/pureplay-HEAD/samples-and-tests/i-am-a-developer/mechanize/_util.py   pureplay(Download)
class ExperimentalWarning(UserWarning):
    pass
 
def experimental(message):
    warnings.warn(message, ExperimentalWarning, stacklevel=3)

src/b/u/bugzillatools-0.5.3.1/bzlib/command.py   bugzillatools(Download)
                    print '{}={}'.format('.'.join((section, option)), value)
        elif not args.name:
            raise UserWarning('No configuration option given.')
        else:
            try:
                section, option = args.name.rsplit('.', 1)
            except ValueError:
                raise UserWarning('Invalid configuration option.')
            if not section or not option:
                raise UserWarning('Invalid configuration option.')
        except IndexError:
            # no value matching the chosen status
            raise UserWarning("Invalid status:", status)
 
        # instantiate bugs
            if len(args.bugs) != 1:
                # makes no sense to adjust times on several bugs at once
                raise UserWarning('Cannot adjust times on multiple bugs.')
            self.bz.bug(args.bugs[0]).update(
                estimated_time=args.estimated_time,

src/p/y/python-kmos-0.3.6/kmos/types.py   python-kmos(Download)
            layer_name = kwargs.pop('layer')
        except:
            raise UserWarning('Argument layer required.')
 
        try:
            layer = [layer for layer in self.get_layers()
                     if layer.name == layer_name][0]
        except:
            raise UserWarning('Layer %s not found.' % layer_name)
                        self.layer_list.cell = cell.reshape(3, 3)
                    else:
                        raise UserWarning('%s not understood' % cell)
                    self.layer_list.default_layer = \
                        child.attrib['default_layer']
        # if at least one layer is defined
        if not len(self.get_layers()) >= 1:
            raise UserWarning('No layer defined.')
 
        # if a least one site if defined
        if not len([x  for layer in self.get_layers()
                       for x in layer.sites]) >= 1:
            raise UserWarning('No site defined.')

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Kamaelia/File/MaxSpeedFileReader.py   kamaelia(Download)
            except noSpaceInBox:
                if self.mustStop():
                    raise UserWarning( "STOP" )
 
                self.pause()
                yield 1
 
                if self.mustStop():
                    raise UserWarning( "STOP" )
                if data=="":
                    self.shutdownMsg=producerFinished(self)
                    raise UserWarning( "STOP" ) 
 
                for _ in self.waitSend(data,"outbox"):
                    yield _
 
                if self.mustStop():
                    raise UserWarning( "STOP" )
                    raise UserWarning( "STOP" )
 
        except UserWarning( "STOP") :
            self.send(self.shutdownMsg, "signal")
 

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