fix exception from ReachedLimit.__repr__ when it has been instantiated implicitly and __init__ was not called

This commit is contained in:
Noah Levitt 2017-05-16 15:47:18 -07:00
parent 31dc6a2d97
commit 89e7c8b079
2 changed files with 3 additions and 2 deletions

View File

@ -48,7 +48,8 @@ class ReachedLimit(Exception):
def __repr__(self):
return "ReachedLimit(warcprox_meta=%s,http_payload=%s)" % (
repr(self.warcprox_meta), repr(self.http_payload))
repr(self.warcprox_meta) if hasattr(self, 'warcprox_meta') else None,
repr(self.http_payload) if hasattr(self, 'http_payload') else None)
def __str__(self):
return self.__repr__()

View File

@ -32,7 +32,7 @@ def find_package_data(package):
setuptools.setup(
name='brozzler',
version='1.1b11.dev248',
version='1.1b11.dev249',
description='Distributed web crawling with browsers',
url='https://github.com/internetarchive/brozzler',
author='Noah Levitt',