Skip to content

Commit

Permalink
Change longs to ints for python 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
rallytime committed Apr 6, 2015
1 parent c2285c6 commit c487476
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/cloud/clouds/vmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _edit_existing_hard_disk_helper(disk, size_kb):
def _add_new_hard_disk_helper(disk_label, size_gb, unit_number):
random_key = randint(-2099, -2000)

size_kb = long(size_gb) * 1024 * 1024
size_kb = int(size_gb) * 1024 * 1024

disk_spec = vim.vm.device.VirtualDeviceSpec()
disk_spec.fileOperation = 'create'
Expand Down Expand Up @@ -331,7 +331,7 @@ def _manage_devices(devices, vm):
existing_disks_label.append(device.deviceInfo.label)
if device.deviceInfo.label in devices['disk'].keys():
size_gb = devices['disk'][device.deviceInfo.label]['size']
size_kb = long(size_gb) * 1024 * 1024
size_kb = int(size_gb) * 1024 * 1024
if device.capacityInKB < size_kb:
# expand the disk
disk_spec = _edit_existing_hard_disk_helper(device, size_kb)
Expand Down

0 comments on commit c487476

Please sign in to comment.