Bläddra i källkod

Another GCE labels change for py2

Enis Afgan 7 år sedan
förälder
incheckning
75314f23e0
1 ändrade filer med 1 tillägg och 1 borttagningar
  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
     # 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
     # cannot be be simply cast into a str for py2 so pop the key and re-add it
     labels.pop(key, None)
     labels.pop(key, None)
-    labels[key] = value
+    labels[key] = str(value)
     request_body = {
     request_body = {
         "labels": labels,
         "labels": labels,
         "labelFingerprint":
         "labelFingerprint":