Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dhinakg committed Dec 20, 2018
1 parent 543c2f0 commit b3f399e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hyperv.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def updateOutput(self):
self.updateRunningVMs()
self.updateVMs()
def isFound(self):
if "not recognized" in self.runningVMs[0]:
if "not recognized" in self.runningVMs[]:
return False
else:
return True
Expand Down
8 changes: 4 additions & 4 deletions mainrefactored.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@
STATUS = "Running VMs"
# Get VM count so we can show how many are running
vmcount = [vmware.runCount(), vmware.runCount()]
HYPERVISOR = "Running VMware"
HYPERVISOR = "VMware"
else:
# Init variable
displayName = vmware.getRunningGuestName(0)
STATUS = "Virtualizing " + displayName # Set status
vmcount = None # Only 1 VM, so set vmcount to None
HYPERVISOR = "Running VMware"
HYPERVISOR = "VMware"
if "hyper-v" in hypervisors:
hyperv.updateRunningVMs()
if hyperv.isFound() == False:
Expand All @@ -115,7 +115,7 @@
STATUS = "Running VMs"
# Get VM count so we can show how many are running
vmcount = [hyperv.runCount(), hyperv.runCount()]
HYPERVISOR = "Running Hyper-V"
HYPERVISOR = "Hyper-V"
else:
# Init variable
displayName = hyperv.getRunningGuestName(0)
Expand All @@ -133,5 +133,5 @@
else:
largetext = "Check out vm-rpc by DhinakG on GitHub!"
# The big RPC update
RPC.update(state=STATUS,details=HYPERVISOR,large_image=largeimage,large_text=largetext,start=epoch_time,party_size=vmcount)
RPC.update(state=STATUS,details="Running " + HYPERVISOR,large_image=largeimage,large_text=largetext,start=epoch_time,party_size=vmcount)
LASTSTATUS = STATUS # Update last status to last status sent

0 comments on commit b3f399e

Please sign in to comment.