Explorar o código

Another GCE labels change for py2

Enis Afgan %!s(int64=7) %!d(string=hai) anos
pai
achega
75314f23e0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cloudbridge/cloud/providers/gce/helpers.py

+ 1 - 1
cloudbridge/cloud/providers/gce/helpers.py

@@ -167,7 +167,7 @@ def change_label(resource, key, value, res_att, request):
     # The returned value from above command yields a unicode dict key, which
     # cannot be be simply cast into a str for py2 so pop the key and re-add it
     labels.pop(key, None)
-    labels[key] = value
+    labels[key] = str(value)
     request_body = {
         "labels": labels,
         "labelFingerprint":