hplip/hplip-check.patch

42 lines
1.6 KiB
Diff
Raw Normal View History

2013-11-26 16:59:00 +04:00
diff -up hplip-3.12.10a/check.py.check hplip-3.12.10a/check.py
diff -up hplip-3.12.10a/installer/core_install.py.check hplip-3.12.10a/installer/core_install.py
--- hplip-3.12.10a/installer/core_install.py.check 2012-11-22 13:22:58.527444444 +0000
+++ hplip-3.12.10a/installer/core_install.py 2012-11-22 13:27:11.319338942 +0000
@@ -1153,18 +1153,24 @@ 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):