Skip to content

Commit

Permalink
Log the exception if device scan fails, and exit. rockstor#1026
Browse files Browse the repository at this point in the history
  • Loading branch information
schakrava committed Nov 30, 2015
1 parent 39e60e7 commit c4fe6b0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/rockstor/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@


def main():
aw = APIWrapper()
device_scan()

try:
device_scan()
except Exception, e:
print ('BTRFS device scan failed due to an exception. This indicates '
'a serious problem. Aborting. Exception: %s' % e.__str__())
sys.exit(1)
print('BTRFS device scan complete')

num_attempts = 0
while True:
try:
aw = APIWrapper()
aw.api_call('network')
aw.api_call('commands/bootstrap', calltype='post')
break
Expand Down

0 comments on commit c4fe6b0

Please sign in to comment.