Skip to contentSkip to conversation

openstackchef_inc.bbclass: Update python synthax for except

PATCH In review Adrian Dudau 2 participants 2 messages Sep 16, 2016 – Sep 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openstackchef_inc.bbclass: Update python synthax for except

The synthax used is deprecated and causes errors.

---
 meta-openstack/classes/openstackchef_inc.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-openstack/classes/openstackchef_inc.bbclass +2 -2
index b8757be..048fce6 100644
@@ -248,7 +248,7 @@ def deploychef_make_startup_shutdown_list(d):
                     raise bb.build.FuncFailed(msg)
             hStartup.close()
             hShutdown.close()
-        except IOError, e:
+        except IOError as e:
             bb.error("Error opening startup/shutdown files %s %s,  %s %s" % \
             (startup_file, shutdown_file, d.getVar('FILE'), e))
     else:
@@ -381,7 +381,7 @@ def deploychef_make_templates( d, conf_tuple=tuple()):
                         deploychef_make_substitutions(d, sub_dict, attr_file, file_name)
                     else:
                         bb.build.FuncFailed(msg)
-        except IOError, e:
+        except IOError as e:
             bb.error("Could not write to attribute file %s: in %s,  %s" % \
             (attr_file, d.getVar('FILE'), e))
 
Signature · 1 line
1.9.1
#1 lore raw

merged.

Bruce

Quoted 42 lines · Adrian Dudau

The synthax used is deprecated and causes errors.

---
 meta-openstack/classes/openstackchef_inc.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-openstack/classes/openstackchef_inc.bbclass +1 -1
index b8757be..048fce6 100644
@@ -248,7 +248,7 @@ def deploychef_make_startup_shutdown_list(d):
                     raise bb.build.FuncFailed(msg)
             hStartup.close()
             hShutdown.close()
-        except IOError, e:
+        except IOError as e:
             bb.error("Error opening startup/shutdown files %s %s,  %s %s"
 % \
             (startup_file, shutdown_file, d.getVar('FILE'), e))

else:

meta-openstack/classes/openstackchef_inc.bbclass +1 -1
@@ -381,7 +381,7 @@ def deploychef_make_templates( d, conf_tuple=tuple()):
                         deploychef_make_substitutions(d, sub_dict,
 attr_file, file_name)
                     else:
                         bb.build.FuncFailed(msg)
-        except IOError, e:
+        except IOError as e:
             bb.error("Could not write to attribute file %s: in %s,  %s" %
 \
             (attr_file, d.getVar('FILE'), e))

--
1.9.1

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"