aboutsummaryrefslogtreecommitdiffstats
path: root/backend/raw_write.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/raw_write.py')
-rwxr-xr-xbackend/raw_write.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/backend/raw_write.py b/backend/raw_write.py
index ed617cd..40dc99b 100755
--- a/backend/raw_write.py
+++ b/backend/raw_write.py
@@ -30,7 +30,6 @@
import os
import io
import gettext
-import pydbus
from subprocess import call
import hashlib
import gnupg
@@ -46,18 +45,17 @@ class Dumper(object):
try:
ifc=io.open(source, "rb",1)
except:
- message = _('Reading error.')+ source
- self.logger(message)
- self.return_state = False
- self.return_message = message
- self.finished.set()
- return
+ message = _('Reading error.')+ source
+ self.return_state = False
+ self.return_message = message
+ self.finished.set()
+ return
else:
try:
ofc= io.open(target, 'wb',0)
except:
message = _("You don't have permission to write to the device {}").format(target)
- self.logger(message)
+ logging.error(message)
self.return_state = False
self.return_message = message
self.finished.set()
@@ -77,7 +75,7 @@ class Dumper(object):
buf=ifc.read(bs)
except:
message = _("Reading error.")
- self.logger(message)
+ logging.error(message)
self.return_state = False
self.return_message = message
self.finished.set()
@@ -107,7 +105,7 @@ class Dumper(object):
ofc.close()
except:
message = _("Writing error.")
- self.logger(message)
+ logging.error(message)
self.return_message = message
self.return_state = False
return