Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.playbook
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos.playbook
Commits
b1fd9bc7
Commit
b1fd9bc7
authored
May 26, 2015
by
Kristopher Ruzic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for table existence to fail a bit better
parent
cd3ab8f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
playbook/roles/erp5-standalone/files/erp5-show
playbook/roles/erp5-standalone/files/erp5-show
+13
-0
No files found.
playbook/roles/erp5-standalone/files/erp5-show
View file @
b1fd9bc7
...
...
@@ -34,6 +34,17 @@ def get_connection_information():
print
"empty"
return
(
None
,
None
)
def
check_tables
():
conn
=
sqlite3
.
connect
(
"/opt/slapos/slapproxy.db"
)
cur
=
conn
.
cursor
()
qry
=
cur
.
execut
(
"SELECT CASE WHEN tbl_name = 'partition11' THEN 1 ELSE 0 END FROM sqlite_master WHERE tbl_name = 'partition11' AND type = 'table'"
)
if
qry
:
pass
else
:
print
"tables aren't ready yet, your build may have failed, check logs in /opt/slapos/log/"
sys
.
exit
(
0
)
def
get_build_status
():
try
:
f
=
open
(
"/opt/slapos/log/slapos-node-software-"
+
fmt_date
()
+
".log"
)
...
...
@@ -94,8 +105,10 @@ def main(argv):
usage
()
sys
.
exit
()
elif
opt
in
(
"-s"
,
"--status"
):
check_tables
()
status
()
elif
opt
in
(
"-i"
,
"--info"
):
check_tables
()
info
()
elif
opt
in
(
"-d"
,
"--dump"
):
dump
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment