hplip/hplip-check.patch
2013-02-14 14:19:24 +01:00

40 lines
1.5 KiB
Diff

diff -up hplip-3.13.2/installer/core_install.py.check hplip-3.13.2/installer/core_install.py
--- hplip-3.13.2/installer/core_install.py.check 2013-02-14 14:10:20.000000000 +0100
+++ hplip-3.13.2/installer/core_install.py 2013-02-14 14:12:05.759135292 +0100
@@ -1026,18 +1026,23 @@ class CoreInstall(object):
def check_hpaio(self):
found = False
- log.debug("'Checking for hpaio' in '/etc/sane.d/dll.conf'...")
- try:
- f = file('/etc/sane.d/dll.conf', 'r')
- except IOError:
- log.error("'/etc/sane.d/dll.conf' not found. Is SANE installed?")
- else:
- for line in f:
- lineNoSpace = re.sub(r'\s', '', line)
- hpaiomatched=re.match('hpaio',lineNoSpace)
- if hpaiomatched:
- found = True
- break
+ for path in ['/etc/sane.d/dll.conf',
+ '/etc/sane.d/dll.d/hpaio']:
+ log.debug("'Checking for hpaio' in '%s'..." % path)
+ try:
+ f = file(path, 'r')
+ except IOError:
+ log.error("'%s' not found. Is SANE installed?" % path)
+ else:
+ for line in f:
+ lineNoSpace = re.sub(r'\s', '', line)
+ hpaiomatched=re.match('hpaio',lineNoSpace)
+ if hpaiomatched:
+ found = True
+ break
+
+ if found:
+ break
return found
def update_hpaio(self):