mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
clases/lib: Use modern exception syntax
Update older code to use modern exception handling syntax which is the form accepted by python 3. (From OE-Core rev: b010501cd089e649a68f683be0cf4d0aac90fbe3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
def read_file(filename):
|
||||
try:
|
||||
f = file( filename, "r" )
|
||||
except IOError, reason:
|
||||
except IOError as reason:
|
||||
return "" # WARNING: can't raise an error now because of the new RDEPENDS handling. This is a bit ugly. :M:
|
||||
else:
|
||||
return f.read().strip()
|
||||
|
||||
Reference in New Issue
Block a user