X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vim_db.py;h=d6ac871052310da46846aa5a5fed35507f9b2b2a;hb=50a052f5e3c1202e5c787851e8b2dd69d8f20629;hp=a0244279ba8d780db168a94ea105f2b48e72d086;hpb=c1d1d47cee5bd382fd9e2ca4d829aef0f545a0d1;p=osm%2Fopenvim.git diff --git a/vim_db.py b/vim_db.py index a024427..d6ac871 100644 --- a/vim_db.py +++ b/vim_db.py @@ -226,7 +226,7 @@ class vim_db(): select_ = "SELECT " if sql_dict.get("DISTINCT"): select_ += "DISTINCT " - select_ += ("*" if 'SELECT' not in sql_dict else ",".join(map(str,sql_dict['SELECT'])) ) + select_ += ("*" if not sql_dict.get('SELECT') else ",".join(map(str,sql_dict['SELECT'])) ) #print 'select_', select_ from_ = "FROM " + str(sql_dict['FROM']) #print 'from_', from_ @@ -259,7 +259,7 @@ class vim_db(): else: where_ = "" #print 'where_', where_ - limit_ = "LIMIT " + str(sql_dict['LIMIT']) if 'LIMIT' in sql_dict else "" + limit_ = "LIMIT " + str(sql_dict['LIMIT']) if sql_dict.get("LIMIT") else "" #print 'limit_', limit_ cmd = " ".join( (select_, from_, where_, limit_) ) for retry_ in range(0,2):