Skip to content

Commit

Permalink
minor improvement in exception logging. #991
Browse files Browse the repository at this point in the history
  • Loading branch information
schakrava committed Nov 11, 2015
1 parent 93236de commit c81b661
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/rockstor/storageadmin/views/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def post(self, request, command):
e_msg = ('Failed to make the Snapshot(%s) visible. '
'Exception: %s' % (snap.real_name, e.__str__()))
logger.error(e_msg)
logger.exception(e)

mnt_map = sftp_mount_map(settings.SFTP_MNT_ROOT)
for sftpo in SFTP.objects.all():
Expand Down Expand Up @@ -177,8 +176,7 @@ def post(self, request, command):
system_shutdown()
except Exception, e:
msg = ('Failed to shutdown the system due to a low level '
'error')
logger.exception(e)
'error: %s' % e.__str__())
handle_exception(Exception(msg), request)
finally:
return Response(msg)
Expand All @@ -189,8 +187,8 @@ def post(self, request, command):
request.session.flush()
system_reboot()
except Exception, e:
msg = ('Failed to reboot the system due to a low level error')
logger.exception(e)
msg = ('Failed to reboot the system due to a low level error: '
'%s' % e.__str__())
handle_exception(Exception(msg), request)
finally:
return Response(msg)
Expand Down

0 comments on commit c81b661

Please sign in to comment.