Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __call__(self):
try:
a = self.args
callargs = [getattr(a, name) for name in a.argnames]
self.db_connect()
try:
return self.args.func(*callargs)
finally:
self.db_close()
except Exception, err:
print 0
print str(err)
if __name__ == "__main__":
main = Main()
main()