Skip to content

Commit

Permalink
python3: more 2 to 3 tool fixes
Browse files Browse the repository at this point in the history
Changes exception statements to match python 3 style

partial: vmware#55
  • Loading branch information
hartsock committed Jul 28, 2014
1 parent 170ea1d commit 1febb9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyVim/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def __Login(host, port, user, pwd, service, adapter, version, path,
content = si.RetrieveContent()
except vmodl.MethodFault:
raise
except Exception, e:
except Exception as e:
# NOTE (hartsock): preserve the traceback for diagnostics
# pulling and preserving the traceback makes diagnosing connection
# failures easier since the fault will also include where inside the
Expand Down
2 changes: 1 addition & 1 deletion pyVmomi/SoapAdapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ def InvokeAccessor(self, mo, info):
time.sleep(self.retryDelay)
retriesLeft -= 1
continue
except Exception, e:
except Exception as e:
if isinstance(e, self.SESSION_EXCEPTIONS):
# Our session might've timed out, change our state and retry.
self._SetStateUnauthenticated()
Expand Down

0 comments on commit 1febb9a

Please sign in to comment.