Better error reporting for timelapse rendering and system commands, updated pnotify and added possibility to add a "more" section to notifications

This commit is contained in:
Gina Häußge committed 2014-05-26 22:51:45 +02:00
1 parent 244128c7ed
commit cbde819e07
16 files changed
+123 -187

No files matched your search

+4
View File
@@ -8,11 +8,14 @@ import sys
import time
import re
import tempfile
import logging
from flask import make_response
from octoprint.settings import settings, default_settings
logger = logging.getLogger(__name__)
def getFormattedSize(num):
"""
Taken from http://stackoverflow.com/a/1094933/2028598
@@ -171,6 +174,7 @@ def safeRename(old, new):
os.remove(backup)
except OSError:
# if anything went wrong, try to rename the backup file to its original name
logger.error("Could not perform safe rename, trying to revert")
if os.path.exists(backup):
os.remove(new)
os.rename(backup, new)