File: fixes-nova-manage-network-modify.patch

package info (click to toggle)
nova 2012.1.1-18
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 18,900 kB
  • sloc: python: 102,511; sql: 3,318; sh: 2,488; xml: 1,131; makefile: 146
file content (22 lines) | stat: -rw-r--r-- 746 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Fixes nova-manage network modify: 'bool' object has no attribute 'decode
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: http://bugs.debian.org/672350
Origin: https://review.openstack.org/#/c/7298/1/bin/nova-manage
Bug: https://review.openstack.org/#/c/7298/
Forwarded: not-needed
Reviewed-By: Thomas Goirand <zigo@debian.org>

--- nova-2012.1.orig/bin/nova-manage
+++ nova-2012.1/bin/nova-manage
@@ -1724,8 +1724,10 @@ def main():
     for k, v in fn_kwargs.items():
         if v is None:
             del fn_kwargs[k]
-        else:
+        elif isinstance(v, basestring):
             fn_kwargs[k] = v.decode('utf-8')
+        else:
+            fn_kwargs[k] = v
 
     fn_args = [arg.decode('utf-8') for arg in fn_args]