]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Fix Powershell binding generation
authorAlex Brett <alex.brett@citrix.com>
Mon, 19 Oct 2015 13:05:00 +0000 (14:05 +0100)
committerAlex Brett <alex.brett@citrix.com>
Mon, 19 Oct 2015 13:05:53 +0000 (14:05 +0100)
server/app/apiv2/powershellbindings.py

index a5ffd3c07714edf9d9cc939b999b3487905bacf5..48e7a379c0bc6c5d3b64d6a0132b0d5c5d050adb 100644 (file)
@@ -29,6 +29,10 @@ class Path(object):
             return param
 
     def powerShellType(self, typename, items):
+        if type(typename) is list:
+            # Find the first non-null item in the list
+            typename = filter(lambda t: t != "null", typename)[0]
+
         if typename == "file":
             return "string"
         elif typename == "object":