Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
Raised when failed to read ammo file properly.

src/y/a/yandex-tank-HEAD/Tank/stepper/config.py   yandex-tank(Download)
from module_exceptions import StepperConfigurationError, AmmoFileError
import load_plan as lp
import instance_plan as ip
import missile
from mark import get_marker
                        except StopIteration, e:
                            self.log("Couldn't read first line of ammo file: %s" % e)
                            raise AmmoFileError("Couldn't read first line of ammo file")
 
            else:

src/y/a/yandex-tank-HEAD/Tank/stepper/missile.py   yandex-tank(Download)
from util import get_opener
from itertools import cycle
from module_exceptions import AmmoFileError
import os.path
import info
                        if len(missile) < chunk_size:
                            raise AmmoFileError(
                                "Unexpected end of file: read %s bytes instead of %s" % (len(missile), chunk_size))
                        yield (missile, marker)
                    except (IndexError, ValueError) as e:
                        raise AmmoFileError(
                            "Error while reading ammo file. Position: %s, header: '%s', original exception: %s" % (ammo_file.tell(), chunk_header, e))
                if info.status.ammo_count == 0:
                    self.log.error("No ammo in uri-style file")
                    raise AmmoFileError("No ammo! Cover me!")
                ammo_file.seek(0)
                info.status.af_position = 0
                        if len(missile) < chunk_size:
                            raise AmmoFileError(
                                "Unexpected end of file: read %s bytes instead of %s" % (len(missile), chunk_size))
                        yield (
                            HttpAmmo(