Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75168 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2014-07-24 11:33 -0700 |
| Last post | 2014-07-24 11:33 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Using pyVmomi Ethan Furman <ethan@stoneleaf.us> - 2014-07-24 11:33 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2014-07-24 11:33 -0700 |
| Subject | Re: Using pyVmomi |
| Message-ID | <mailman.12291.1406226830.18130.python-list@python.org> |
On 07/23/2014 01:14 PM, Joseph L. Casale wrote:
>
> I am doing some scripting with pyVmomi under 2.6.8 so the code may
> run directly on a vmware esxi server.
>
> As the code is long running, it surpasses the authentication timeout. For
> anyone familiar with this code and/or this style of programming, does anyone
> have a recommendation for an elegant authentication retry scheme for objects
> passed to code that will intermittently access the properties invoking calls.
>
> I'd prefer to not litter try/except blocks around the usage of the objects if
> possible.
You could:
- have a single point of entry that can check and, if necessary, revalidate
- create a helper that checks and, if necessary, revalidate, which is then
called where ever needed
- create a decorator that does the above for each function that needs it
--
~Ethan~
Back to top | Article view | comp.lang.python
csiph-web