Skip to content

Instantly share code, notes, and snippets.

@vvikramjhu
Forked from anonymous/a.py
Last active December 30, 2015 15:09
Show Gist options
  • Save vvikramjhu/7846956 to your computer and use it in GitHub Desktop.
Save vvikramjhu/7846956 to your computer and use it in GitHub Desktop.
try:
curs.execute('REPLACE INTO nvd_cpe\
(cpe, cpe_part, cpe_vendor, cpe_product, cpe_version, cpe_update, \
cpe_edition, cpe_language) VALUES (?, ?, ?, ?, ?, ?, ?, ?)', \
(str(nvd_cpe), str(nvd_cpe_variables[2]), str(nvd_cpe_variables[3]),
str( nvd_cpe_variables[4]), str(nvd_cpe_variables[5]), str(nvd_cpe_variables[6], )
str(nvd_cpe_variables[7]), str(nvd_cpe_variables[8])))
except Exception as e:
print "hello everyone"
print traceback.print_exc()
return
hello everyone
Traceback (most recent call last):
File "main-test_linux2.py", line 259, in parse_xml
nvd_cpe_variables[8]))
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 159, in execute
query = query % db.literal(args)
TypeError: not all arguments converted during string formatting
None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment