diff options
Diffstat (limited to 'bitbake/lib/ply')
-rw-r--r-- | bitbake/lib/ply/yacc.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/ply/yacc.py b/bitbake/lib/ply/yacc.py index 767c4e4674..381b50cf0b 100644 --- a/bitbake/lib/ply/yacc.py +++ b/bitbake/lib/ply/yacc.py | |||
@@ -2798,7 +2798,14 @@ class ParserReflect(object): | |||
2798 | def signature(self): | 2798 | def signature(self): |
2799 | try: | 2799 | try: |
2800 | import hashlib | 2800 | import hashlib |
2801 | except ImportError: | ||
2802 | raise RuntimeError("Unable to import hashlib") | ||
2803 | try: | ||
2801 | sig = hashlib.new('MD5', usedforsecurity=False) | 2804 | sig = hashlib.new('MD5', usedforsecurity=False) |
2805 | except TypeError: | ||
2806 | # Some configurations don't appear to support two arguments | ||
2807 | sig = hashlib.new('MD5') | ||
2808 | try: | ||
2802 | if self.start: | 2809 | if self.start: |
2803 | sig.update(self.start.encode('latin-1')) | 2810 | sig.update(self.start.encode('latin-1')) |
2804 | if self.prec: | 2811 | if self.prec: |