diff options
author | Paul Barker <pbarker@konsulko.com> | 2021-04-26 09:16:28 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-27 15:12:57 +0100 |
commit | 10236718236e6a12e2e6528abcd920276d181545 (patch) | |
tree | 1026bd499be15ab6bfea99971dd73ff5d0b4fd32 /bitbake/lib/bb | |
parent | bf348561f332fdeba6b79019852fdd98d031d4a1 (diff) | |
download | poky-10236718236e6a12e2e6528abcd920276d181545.tar.gz |
bitbake: hashserv: Use generic ConnectionError
The Python built-in ConnectionError type can be used instead of a custom
HashConnectionError type. This will make code refactoring simpler.
(Bitbake rev: 8a796c3d6d99cfa8ef7aff0ae55bb0f23bbbeae1)
Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 0d88c6ec68..f3fa3000fa 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -542,7 +542,7 @@ class SignatureGeneratorUniHashMixIn(object): | |||
542 | hashequiv_logger.debug((1, 2)[unihash == taskhash], 'Found unihash %s in place of %s for %s from %s' % (unihash, taskhash, tid, self.server)) | 542 | hashequiv_logger.debug((1, 2)[unihash == taskhash], 'Found unihash %s in place of %s for %s from %s' % (unihash, taskhash, tid, self.server)) |
543 | else: | 543 | else: |
544 | hashequiv_logger.debug2('No reported unihash for %s:%s from %s' % (tid, taskhash, self.server)) | 544 | hashequiv_logger.debug2('No reported unihash for %s:%s from %s' % (tid, taskhash, self.server)) |
545 | except hashserv.client.HashConnectionError as e: | 545 | except ConnectionError as e: |
546 | bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) | 546 | bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) |
547 | 547 | ||
548 | self.set_unihash(tid, unihash) | 548 | self.set_unihash(tid, unihash) |
@@ -621,7 +621,7 @@ class SignatureGeneratorUniHashMixIn(object): | |||
621 | d.setVar('BB_UNIHASH', new_unihash) | 621 | d.setVar('BB_UNIHASH', new_unihash) |
622 | else: | 622 | else: |
623 | hashequiv_logger.debug('Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server)) | 623 | hashequiv_logger.debug('Reported task %s as unihash %s to %s' % (taskhash, unihash, self.server)) |
624 | except hashserv.client.HashConnectionError as e: | 624 | except ConnectionError as e: |
625 | bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) | 625 | bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) |
626 | finally: | 626 | finally: |
627 | if sigfile: | 627 | if sigfile: |
@@ -661,7 +661,7 @@ class SignatureGeneratorUniHashMixIn(object): | |||
661 | # TODO: What to do here? | 661 | # TODO: What to do here? |
662 | hashequiv_logger.verbose('Task %s unihash reported as unwanted hash %s' % (tid, finalunihash)) | 662 | hashequiv_logger.verbose('Task %s unihash reported as unwanted hash %s' % (tid, finalunihash)) |
663 | 663 | ||
664 | except hashserv.client.HashConnectionError as e: | 664 | except ConnectionError as e: |
665 | bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) | 665 | bb.warn('Error contacting Hash Equivalence Server %s: %s' % (self.server, str(e))) |
666 | 666 | ||
667 | return False | 667 | return False |