scripts/kvm/kvm_stat: Introduce main function
commit639ce1831082084af80290c79f06a5794a3caa0b
authorJanosch Frank <frankja@linux.vnet.ibm.com>
Mon, 11 Jan 2016 15:17:39 +0000 (11 16:17 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 Jan 2016 14:58:12 +0000 (26 15:58 +0100)
tree90a3fc0b7ceef1132ee743e987b8b78314eb1ab6
parent7aa4ee5a60c6ac651fd2e60b783630e35a7e3ff4
scripts/kvm/kvm_stat: Introduce main function

The main function should be the main location for initialization and
helps encapsulating variables into a scope. This way they don't have
to be global and might be mistaken for local ones.

As the providers variable is scoped now it can't be accessed from
within the Stats class. Hence, the global access to the variable was
changed to a local one.

Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Message-Id: <1452525484-32309-10-git-send-email-frankja@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/kvm/kvm_stat