vmware/pyvmomi-community-samples

Do not swallow errors!

Open

#11 aperta il 21 mag 2014

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Python (914 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (972 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/create_random_marvel_vms.py#L195

In sample code, don't trap errors coming off of ...

si = connect.SmartConnect(

... instead just expose those to the CLI. We are attempting to make teaching samples here and too thoroughly swallowing or handling errors can make the samples harder to read and understand for programmers who are still learning.

Guida contributor