update db version
This commit is contained in:
parent
4606c63680
commit
533c2e2f7f
1 changed files with 3 additions and 3 deletions
|
@ -97,7 +97,7 @@ class Client(object):
|
||||||
c.execute(i)
|
c.execute(i)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
if int(self.get('version', 0)) < 2:
|
if int(self.get('version', 0)) < 2:
|
||||||
self.set('version', 1)
|
self.set('version', 2)
|
||||||
db = [
|
db = [
|
||||||
'''CREATE TABLE IF NOT EXISTS encode (
|
'''CREATE TABLE IF NOT EXISTS encode (
|
||||||
oshash varchar(16),
|
oshash varchar(16),
|
||||||
|
@ -159,8 +159,8 @@ class Client(object):
|
||||||
self.user = r['data']['user']
|
self.user = r['data']['user']
|
||||||
else:
|
else:
|
||||||
self.user = False
|
self.user = False
|
||||||
print 'login failed'
|
print '\nlogin failed! check config\n\n'
|
||||||
return False
|
sys.exit()
|
||||||
r = self.api.init()
|
r = self.api.init()
|
||||||
if r['status']['code'] == 200:
|
if r['status']['code'] == 200:
|
||||||
self.api._config = r['data']['site']
|
self.api._config = r['data']['site']
|
||||||
|
|
Loading…
Reference in a new issue