Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

auth.py must import import sqlite3 #654

Closed
brunotm opened this issue Oct 27, 2016 · 1 comment · Fixed by #657
Closed

auth.py must import import sqlite3 #654

brunotm opened this issue Oct 27, 2016 · 1 comment · Fixed by #657

Comments

@brunotm
Copy link
Contributor

brunotm commented Oct 27, 2016

For checking against sqlite3.Exceptions:
except sqlite3.Error, e:

//CC @lipingxue

@brunotm
Copy link
Contributor Author

brunotm commented Oct 27, 2016

Example error when exception is caught from AuthorizationDataManager.

10/27/16 01:41:15 83153 [vsc01-volTestP00] [INFO   ] *** createVMDK: /vmfs/volumes/datastore1/dockvols/volTestP00.vmdk opts = {u'size': u'1gb', u'fstype': u'ext4'}
10/27/16 01:41:15 83153 [vsc02-volTestP10] [ERROR  ] Unhandled Exception:
Traceback (most recent call last):
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 1205, in execRequestThread
    opts=opts)
  File "/usr/lib/vmware/vmdkops/bin/vmdk_ops.py", line 572, in executeRequest
    error_info, tenant_uuid, tenant_name = auth.authorize(vm_uuid, vm_datastore, cmd, opts)
  File "/usr/lib/vmware/vmdkops/Python/auth.py", line 277, in authorize
    if not tables_exist():
  File "/usr/lib/vmware/vmdkops/Python/auth.py", line 208, in tables_exist
    except sqlite3.Error, e:
NameError: global name 'sqlite3' is not defined

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants