Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37387763
en ru br
Репозитории ALT
S:3.23.8-alt1
5.1: 3.11.5-alt0.M51.1
4.1: 2.8.10-alt2.M41.1
4.0: 2.7.12-alt2.M40.1
+backports:2.8.10-alt2.M40.1
3.0:
+backports:1.6.6a-alt0.M30.4.1
www.altlinux.org/Changes

Группа :: Издательство
Пакет: hplip

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: hplip-clean-ldl.patch
Скачать


diff --git a/base/device.py b/base/device.py
index 6d7add9..bf27307 100644
--- a/base/device.py
+++ b/base/device.py
@@ -2264,7 +2264,8 @@ class Device(object):
                 self.callback()
 
         if total_bytes_to_write != bytes_out:
-            raise Error(ERROR_DEVICE_IO_ERROR)
+            raise Error(ERROR_DEVICE_IO_ERROR, 'Number of written '
+                        'bytes by hpmudext mismatch with expected amount.')
 
         return bytes_out
 
diff --git a/base/g.py b/base/g.py
index 9856662..0aa0e2e 100644
--- a/base/g.py
+++ b/base/g.py
@@ -398,9 +398,11 @@ ERROR_STRINGS = {
 
 
 class Error(Exception):
-    def __init__(self, opt=ERROR_INTERNAL):
+    def __init__(self, opt=ERROR_INTERNAL, msg=None):
         self.opt = opt
         self.msg = ERROR_STRINGS.get(opt, ERROR_STRINGS[ERROR_INTERNAL])
+        if msg:
+            self.msg = '{} - {}'.format(self.msg, msg)
         log.debug("Exception: %d (%s)" % (opt, self.msg))
         Exception.__init__(self, self.msg, opt)
 
diff --git a/prnt/ldl.py b/prnt/ldl.py
index e3f77f7..8b28e7f 100644
--- a/prnt/ldl.py
+++ b/prnt/ldl.py
@@ -145,7 +145,7 @@ def buildLIDILPacket(packet_type, command=0, operation=0, other={}):
         p = '$\x00\x10\x00\x08\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$'
 
     elif packet_type == PACKET_TYPE_RESET_LIDIL:
-        p = '$\x00\x10\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$'
+        p = b'$\x00\x10\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$'
 
     elif packet_type == PACKET_TYPE_COMMAND:
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin