Compare commits
No commits in common. 'i10cs' and 'c9' have entirely different histories.
@ -1,3 +1,3 @@
|
||||
SOURCES/hp-laserjet_cp_1025nw.ppd.gz
|
||||
SOURCES/hp-laserjet_professional_p_1102w.ppd.gz
|
||||
SOURCES/hplip-3.23.12-repack.tar.gz
|
||||
SOURCES/hplip-3.21.2-repack.tar.gz
|
||||
|
@ -1,3 +1,3 @@
|
||||
ab5f8109daf6ec9ccc9571a1155e2438d581e096 SOURCES/hp-laserjet_cp_1025nw.ppd.gz
|
||||
653b9a1d89a5aecedc8a9a66835ac060d995dfa2 SOURCES/hp-laserjet_professional_p_1102w.ppd.gz
|
||||
c3fe73535960f15f51fe4604747d943e4956cc3d SOURCES/hplip-3.23.12-repack.tar.gz
|
||||
6523daf5be0a41a0b40a24cf54ca5e03bcefd9ba SOURCES/hplip-3.21.2-repack.tar.gz
|
||||
|
@ -1,62 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# get version from base hplip rpm - it is always in the second column
|
||||
VER=$(@bindir@/rpm -q hplip | @bindir@/awk -F '-' '{print $2}')
|
||||
|
||||
if test "x$VER" = "x"
|
||||
then
|
||||
@bindir@/echo "Version was not acquired - exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# plugin name
|
||||
PLUGIN_FILE="hplip-${VER}-plugin.run"
|
||||
|
||||
download()
|
||||
{
|
||||
SOURCE="$1"
|
||||
|
||||
@bindir@/curl --create-dirs -O --output-dir ~/.hplip ${SOURCE}
|
||||
}
|
||||
|
||||
# link to the plugin
|
||||
PLUGIN_SOURCE="https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${PLUGIN_FILE}"
|
||||
FALLBACK_SOURCE="https://developers.hp.com/sites/default/files/${PLUGIN_FILE}"
|
||||
|
||||
# create a hidden hplip dir to store a file indicating the plugin version after successful install
|
||||
# the directory can be used by other hplip tools, so we don't have to remove it if the failure happens
|
||||
if [ ! -d ~/.hplip ]
|
||||
then
|
||||
@bindir@/mkdir ~/.hplip || (@bindir@/echo "Cannot create the ~/.hplip dir, exiting" && exit 1)
|
||||
fi
|
||||
|
||||
for link in ${PLUGIN_SOURCE} ${FALLBACK_SOURCE}
|
||||
do
|
||||
download ${link}
|
||||
|
||||
if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "xtext/x-shellscript"
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test "x$(file --mime ~/.hplip/${PLUGIN_FILE} | grep 'text/x-shellscript')" = "x"
|
||||
then
|
||||
@bindir@/echo "The downloaded file does not exist or is not a shell script - error during downloading, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@bindir@/bash ~/.hplip/${PLUGIN_FILE}
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
@bindir@/echo "Plugin installation failed, exiting..."
|
||||
@bindir@/rm -f ~/.hplip/${PLUGIN_FILE} &> /dev/null
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@bindir@/rm -f ~/.hplip/${PLUGIN_FILE} &> /dev/null
|
||||
@bindir@/rm -f ~/.hplip/plugin-installed-* &> /dev/null
|
||||
@bindir@/touch ~/.hplip/plugin-installed-$VER
|
||||
|
||||
exit 0
|
@ -1,17 +1,16 @@
|
||||
diff --git a/installer/core_install.py b/installer/core_install.py
|
||||
index a6654e2..0bd1e9c 100644
|
||||
--- a/installer/core_install.py
|
||||
+++ b/installer/core_install.py
|
||||
@@ -362,9 +362,9 @@ class CoreInstall(object):
|
||||
diff -up hplip-3.17.11/installer/core_install.py.check-cups hplip-3.17.11/installer/core_install.py
|
||||
--- hplip-3.17.11/installer/core_install.py.check-cups 2017-12-07 15:34:24.855761874 +0100
|
||||
+++ hplip-3.17.11/installer/core_install.py 2017-12-07 15:38:44.749568860 +0100
|
||||
@@ -349,9 +349,9 @@ class CoreInstall(object):
|
||||
'automake': (True, ['prnt'], AUTOMAKE_STR, self.check_automake, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', None, GENERALDEP),
|
||||
'libjpeg': (True, ['base', 'prnt'], JPEG_STR, self.check_libjpeg, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', None, GENERALDEP),
|
||||
'libtool': (True, ['base', 'prnt'], LIBTOOL_STR, self.check_libtool, DEPENDENCY_COMPILE_TIME, '-', 'libtool --version', COMPILEDEP),
|
||||
- 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '1.1', 'cups-config --version', EXTERNALDEP),
|
||||
- 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '-', 'cups-config --version', GENERALDEP),
|
||||
- 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '-', 'cups-config --version', GENERALDEP),
|
||||
+ 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '-', None, EXTERNALDEP),
|
||||
+ 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '1.1', 'pkgconf --modversion cups', GENERALDEP),
|
||||
+ 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '1.1', 'pkgconf --modversion cups', GENERALDEP),
|
||||
+ 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '1.1', 'lpstat -r', EXTERNALDEP),
|
||||
+ 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '-', 'lpstat -r', GENERALDEP),
|
||||
+ 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '-', 'lpstat -r', GENERALDEP),
|
||||
'gcc': (True, ['base', 'prnt'], GCC_STR, self.check_gcc, DEPENDENCY_COMPILE_TIME, '-', 'gcc --version', COMPILEDEP),
|
||||
'make': (True, ['base', 'prnt'], MAKE_STR, self.check_make, DEPENDENCY_COMPILE_TIME, '3.0', 'make --version', COMPILEDEP),
|
||||
'libpthread': (True, ['base', 'prnt'], THREAD_STR, self.check_libpthread, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', 'FUNC#get_libpthread_version', GENERALDEP),
|
||||
|
@ -0,0 +1,33 @@
|
||||
diff --git a/base/password.py b/base/password.py
|
||||
index bd68f2a..bff9f80 100644
|
||||
--- a/base/password.py
|
||||
+++ b/base/password.py
|
||||
@@ -157,6 +157,28 @@ class Password(object):
|
||||
log.warn("%s distro is not found in AUTH_TYPES" % distro_name)
|
||||
self.__authType = 'su'
|
||||
|
||||
+ # check if caller is in wheel group - use 'su' if he isnt -
|
||||
+ # or if the caller is root (just for showing 'root' username)
|
||||
+ # in the prompt
|
||||
+ import os
|
||||
+ from grp import getgrnam
|
||||
+
|
||||
+ user = os.getenv('USER')
|
||||
+
|
||||
+ try:
|
||||
+ members = getgrnam('wheel').gr_mem
|
||||
+ except KeyError:
|
||||
+ try:
|
||||
+ members = getgrnam('sudo').gr_mem
|
||||
+ except:
|
||||
+ return
|
||||
+
|
||||
+ if user in members:
|
||||
+ self.__authType = 'sudo'
|
||||
+ else:
|
||||
+ self.__authType = 'su'
|
||||
+
|
||||
+
|
||||
def __getPasswordDisplayString(self):
|
||||
if self.__authType == "su":
|
||||
return "Please enter the root/superuser password: "
|
@ -0,0 +1,13 @@
|
||||
diff --git a/ui5/fabwindow.py b/ui5/fabwindow.py
|
||||
index 0b95c94..631727c 100644
|
||||
--- a/ui5/fabwindow.py
|
||||
+++ b/ui5/fabwindow.py
|
||||
@@ -518,7 +518,7 @@ class FABWindow(QMainWindow, Ui_MainWindow):
|
||||
self.__tr("Import fax addresses from LDIF or vCard"),
|
||||
#user_conf.workingDirectory(),
|
||||
self.user_settings.working_dir,
|
||||
- "vCard (*.vcf);;LDIF (*.ldif *.ldi)"))
|
||||
+ "vCard (*.vcf);;LDIF (*.ldif *.ldi)")[0])
|
||||
|
||||
if result:
|
||||
working_directory = to_unicode(os.path.dirname(result))
|
@ -1,13 +0,0 @@
|
||||
diff --git a/base/queues.py b/base/queues.py
|
||||
index 2f56c8a..0818574 100755
|
||||
--- a/base/queues.py
|
||||
+++ b/base/queues.py
|
||||
@@ -101,7 +101,7 @@ def parseQueues(mode):
|
||||
try:
|
||||
match = LPSTAT_PATTERN.search(p)
|
||||
printer_name = match.group(1)
|
||||
- device_uri = match.group(2)
|
||||
+ device_uri = match.group(3)
|
||||
cups_printers.append((printer_name, device_uri))
|
||||
except AttributeError:
|
||||
pass
|
@ -1,13 +0,0 @@
|
||||
diff --git a/base/validation.py b/base/validation.py
|
||||
index 96e65be..35f22eb 100644
|
||||
--- a/base/validation.py
|
||||
+++ b/base/validation.py
|
||||
@@ -58,7 +58,7 @@ class GPG_Verification(DigiSign_Verification):
|
||||
|
||||
if not os.path.exists(self.__gpg_dir):
|
||||
try:
|
||||
- os.mkdir(self.__gpg_dir, 0o755)
|
||||
+ os.mkdir(self.__gpg_dir, 0o700)
|
||||
except OSError:
|
||||
log.error("Failed to create %s" % self.__gpg_dir)
|
||||
self.__change_owner()
|
@ -1,114 +0,0 @@
|
||||
diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c
|
||||
index 57d1dde..3475929 100644
|
||||
--- a/scan/sane/hpaio.c
|
||||
+++ b/scan/sane/hpaio.c
|
||||
@@ -379,7 +379,7 @@ extern SANE_Status sane_hpaio_get_devices(const SANE_Device ***deviceList, SANE_
|
||||
ResetDeviceList(&DeviceList);
|
||||
DevDiscovery(localOnly);
|
||||
*deviceList = (const SANE_Device **)DeviceList;
|
||||
- SANE_Device*** devList;
|
||||
+ const SANE_Device*** devList;
|
||||
orblite_get_devices(devList, localOnly);
|
||||
|
||||
return SANE_STATUS_GOOD;
|
||||
diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
|
||||
index 2eb7aba..4eaa468 100644
|
||||
--- a/scan/sane/orblite.c
|
||||
+++ b/scan/sane/orblite.c
|
||||
@@ -64,28 +64,28 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_SCAN_TL_X, SANE_TITLE_SCAN_TL_X, SANE_DESC_SCAN_TL_X, // name, title, desc
|
||||
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeLeft // constraint_type, constraint
|
||||
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeLeft // constraint_type, constraint
|
||||
},
|
||||
|
||||
{
|
||||
SANE_NAME_SCAN_TL_Y, SANE_TITLE_SCAN_TL_Y, SANE_DESC_SCAN_TL_Y, // name, title, desc
|
||||
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeTop // constraint_type, constraint
|
||||
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeTop // constraint_type, constraint
|
||||
},
|
||||
|
||||
{
|
||||
SANE_NAME_SCAN_BR_X, SANE_TITLE_SCAN_BR_X, SANE_DESC_SCAN_BR_X, // name, title, desc
|
||||
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeRight // constraint_type, constraint
|
||||
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeRight // constraint_type, constraint
|
||||
},
|
||||
|
||||
{
|
||||
SANE_NAME_SCAN_BR_Y, SANE_TITLE_SCAN_BR_Y, SANE_DESC_SCAN_BR_Y, // name, title, desc
|
||||
SANE_TYPE_FIXED, SANE_UNIT_MM, sizeof(SANE_Fixed),// type, unit, size
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_RANGE, (SANE_Char**)&SANE_rangeBottom // constraint_type, constraint
|
||||
+ SANE_CONSTRAINT_RANGE, (const SANE_Char**)&SANE_rangeBottom // constraint_type, constraint
|
||||
},
|
||||
|
||||
// optResolution, // resolution group
|
||||
@@ -93,7 +93,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_SCAN_RESOLUTION, SANE_TITLE_SCAN_RESOLUTION, SANE_DESC_SCAN_RESOLUTION, // name, title, desc
|
||||
SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint
|
||||
},
|
||||
|
||||
// optMode, // color/depth group
|
||||
@@ -101,7 +101,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_SCAN_MODE, SANE_TITLE_SCAN_MODE, SANE_DESC_SCAN_MODE, // name, title, desc
|
||||
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_modes // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_modes // constraint type, constraint
|
||||
},
|
||||
|
||||
// optSource,
|
||||
@@ -109,7 +109,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_SCAN_SOURCE, SANE_TITLE_SCAN_SOURCE, SANE_DESC_SCAN_SOURCE, // name, title, desc
|
||||
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_sources // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_sources // constraint type, constraint
|
||||
},
|
||||
|
||||
// optPaperSize,
|
||||
@@ -117,7 +117,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc
|
||||
SANE_TYPE_STRING, SANE_UNIT_NONE, 256, // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_STRING_LIST, (SANE_Char**)SANE_paper_sizes // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_STRING_LIST, (const SANE_Char**)SANE_paper_sizes // constraint type, constraint
|
||||
},
|
||||
|
||||
// optPaperSize,
|
||||
@@ -125,7 +125,7 @@ SANE_Option_Descriptor DefaultOrbOptions[] = {
|
||||
SANE_NAME_PAPER_SIZE, SANE_TITLE_PAPER_SIZE, SANE_DESC_PAPER_SIZE, // name, title, desc
|
||||
SANE_TYPE_INT, SANE_UNIT_DPI, sizeof(SANE_Word), // type, unit, size,
|
||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, // cap(ability)
|
||||
- SANE_CONSTRAINT_WORD_LIST, (SANE_Char**)SANE_resolutions // constraint type, constraint
|
||||
+ SANE_CONSTRAINT_WORD_LIST, (const SANE_Char**)SANE_resolutions // constraint type, constraint
|
||||
},
|
||||
#ifdef NOTDEF
|
||||
// default template
|
||||
@@ -274,6 +274,7 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle)
|
||||
SANE_Auth_Callback authorize;
|
||||
const SANE_Device *** device_list;
|
||||
SANE_Bool local_only;
|
||||
+ void * temp_handle;
|
||||
|
||||
|
||||
// Allocate handle, set all handle values to zero
|
||||
@@ -305,7 +306,9 @@ orblite_open (SANE_String_Const devicename, SANE_Handle * handle)
|
||||
if (stat != SANE_STATUS_GOOD)
|
||||
return stat;
|
||||
|
||||
- stat = g_handle->bb_orblite_open(devicename, &g_handle);
|
||||
+ temp_handle = g_handle;
|
||||
+ stat = g_handle->bb_orblite_open(devicename, &temp_handle);
|
||||
+ g_handle = temp_handle;
|
||||
if (stat == SANE_STATUS_GOOD)
|
||||
*handle = g_handle;
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff --git a/config_usb_printer.py b/config_usb_printer.py
|
||||
index 946a2d4..8db097e 100755
|
||||
--- a/config_usb_printer.py
|
||||
+++ b/config_usb_printer.py
|
||||
@@ -28,6 +28,7 @@ __doc__ = "Udev invokes this tool. Tool detects the plugin, Smart Install (C/DVD
|
||||
# Std Lib
|
||||
import sys
|
||||
import os
|
||||
+import time
|
||||
|
||||
# Local
|
||||
from base.g import *
|
||||
@@ -181,9 +182,10 @@ try:
|
||||
# ******************************* RUNNING FIRMWARE DOWNLOAD TO DEVICE FOR SUPPORTED PRINTER'S
|
||||
fw_download_req = mq.get('fw-download', False)
|
||||
if fw_download_req:
|
||||
- fw_cmd = "hp-firmware -y3 -s %s"%param
|
||||
+ fw_cmd = "hp-firmware -n -y3 -s %s"%param
|
||||
log.info(fw_cmd)
|
||||
fw_sts, fw_out = utils.run(fw_cmd)
|
||||
+ time.sleep(5)
|
||||
if fw_sts == 0:
|
||||
log.debug("Firmware downloaded to %s "%device_uri)
|
||||
else:
|
@ -1,108 +0,0 @@
|
||||
diff --git a/scan/sane/escl.c b/scan/sane/escl.c
|
||||
index 9fbbcaf..bc9e0b5 100644
|
||||
--- a/scan/sane/escl.c
|
||||
+++ b/scan/sane/escl.c
|
||||
@@ -37,18 +37,12 @@ static int bb_load(struct escl_session *ps, const char *so)
|
||||
int stat=1;
|
||||
|
||||
/* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
|
||||
- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
- {
|
||||
- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
- goto bugout;
|
||||
- }
|
||||
+ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
+ goto bugout;
|
||||
|
||||
/* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
|
||||
- if ((ps->math_handle = load_library("libm.so")) == NULL)
|
||||
- {
|
||||
- if ((ps->math_handle = load_library("libm.so.6")) == NULL)
|
||||
- goto bugout;
|
||||
- }
|
||||
+ if ((ps->math_handle = load_library("libm.so.6")) == NULL)
|
||||
+ goto bugout;
|
||||
if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL)
|
||||
{
|
||||
SendScanEvent(ps->uri, EVENT_PLUGIN_FAIL);
|
||||
diff --git a/scan/sane/marvell.c b/scan/sane/marvell.c
|
||||
index 236f7c9..793104c 100644
|
||||
--- a/scan/sane/marvell.c
|
||||
+++ b/scan/sane/marvell.c
|
||||
@@ -60,18 +60,12 @@ static int bb_load(struct marvell_session *ps, const char *so)
|
||||
int stat=1;
|
||||
|
||||
/* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
|
||||
- if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL)
|
||||
- {
|
||||
- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
- goto bugout;
|
||||
- }
|
||||
+ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
+ goto bugout;
|
||||
|
||||
/* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
|
||||
- if ((ps->math_handle = load_library("libm.so")) == NULL)
|
||||
- {
|
||||
- if ((ps->math_handle = load_library("libm.so.6")) == NULL)
|
||||
- goto bugout;
|
||||
- }
|
||||
+ if ((ps->math_handle = load_library("libm.so.6")) == NULL)
|
||||
+ goto bugout;
|
||||
|
||||
if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL)
|
||||
{
|
||||
diff --git a/scan/sane/soap.c b/scan/sane/soap.c
|
||||
index 0d22e52..dcd8c7c 100644
|
||||
--- a/scan/sane/soap.c
|
||||
+++ b/scan/sane/soap.c
|
||||
@@ -68,18 +68,12 @@ static int bb_load(struct soap_session *ps, const char *so)
|
||||
int stat=1;
|
||||
|
||||
/* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
|
||||
- if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL)
|
||||
- {
|
||||
- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
- goto bugout;
|
||||
- }
|
||||
+ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
+ goto bugout;
|
||||
|
||||
/* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
|
||||
- if ((ps->math_handle = load_library("libm.so")) == NULL)
|
||||
- {
|
||||
- if ((ps->math_handle = load_library("libm.so.6")) == NULL)
|
||||
- goto bugout;
|
||||
- }
|
||||
+ if ((ps->math_handle = load_library("libm.so.6")) == NULL)
|
||||
+ goto bugout;
|
||||
|
||||
if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL)
|
||||
{
|
||||
diff --git a/scan/sane/soapht.c b/scan/sane/soapht.c
|
||||
index 139100d..74e8391 100644
|
||||
--- a/scan/sane/soapht.c
|
||||
+++ b/scan/sane/soapht.c
|
||||
@@ -62,18 +62,12 @@ static int bb_load(struct soap_session *ps, const char *so)
|
||||
int stat=1;
|
||||
|
||||
/* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
|
||||
- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
- {
|
||||
- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
- goto bugout;
|
||||
- }
|
||||
+ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
|
||||
+ goto bugout;
|
||||
|
||||
/* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
|
||||
- if ((ps->math_handle = load_library("libm.so")) == NULL)
|
||||
- {
|
||||
- if ((ps->math_handle = load_library("libm.so.6")) == NULL)
|
||||
- goto bugout;
|
||||
- }
|
||||
+ if ((ps->math_handle = load_library("libm.so.6")) == NULL)
|
||||
+ goto bugout;
|
||||
|
||||
if ((ps->bb_handle = load_plugin_library(UTILS_SCAN_PLUGIN_LIBRARY, so)) == NULL)
|
||||
{
|
@ -1,26 +0,0 @@
|
||||
diff --git a/base/g.py b/base/g.py
|
||||
index 0aa0e2e..96b3131 100644
|
||||
--- a/base/g.py
|
||||
+++ b/base/g.py
|
||||
@@ -128,7 +128,7 @@ class ConfigBase(object):
|
||||
try:
|
||||
fp = open(self.filename, "r")
|
||||
try:
|
||||
- self.conf.readfp(fp)
|
||||
+ self.conf.read_file(fp, self.filename)
|
||||
except configparser.MissingSectionHeaderError:
|
||||
print("")
|
||||
log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename)
|
||||
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
|
||||
index 3110a0f..3761f89 100644
|
||||
--- a/ui5/devmgr5.py
|
||||
+++ b/ui5/devmgr5.py
|
||||
@@ -1072,7 +1072,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
|
||||
|
||||
hplip_conf = configparser.ConfigParser()
|
||||
fp = open("/etc/hp/hplip.conf", "r")
|
||||
- hplip_conf.readfp(fp)
|
||||
+ hplip_conf.read_file(fp, "/etc/hp/hplip.conf")
|
||||
fp.close()
|
||||
|
||||
try:
|
@ -1,34 +0,0 @@
|
||||
The pcardext Python extension cannot be loaded because it has not been
|
||||
ported to Python 3:
|
||||
|
||||
>>> import pcardext
|
||||
Traceback (most recent call last):
|
||||
File "<stdin>", line 1, in <module>
|
||||
ImportError: /usr/lib64/python3.11/site-packages/pcardext.so: undefined symbol: PyString_AsStringAndSize
|
||||
>>>
|
||||
|
||||
Stop building this extension because it breaks the build if the
|
||||
compiler lacks support for implicit function declarations.
|
||||
|
||||
Bug: <https://bugzilla.redhat.com/show_bug.cgi?id=2148210>
|
||||
|
||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index ddac16a9dd514008..15d953af9150c09e 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -306,13 +306,6 @@ if !HPLIP_CLASS_DRIVER
|
||||
pcarddir = $(hplipdir)/pcard
|
||||
dist_pcard_DATA = pcard/__init__.py pcard/photocard.py
|
||||
|
||||
-# pcardext
|
||||
-pcardextdir = $(pyexecdir)
|
||||
-pcardext_LTLIBRARIES = pcardext.la
|
||||
-pcardext_la_LDFLAGS = -module -avoid-version
|
||||
-pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c pcard/pcardext/pcardext.h
|
||||
-pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
|
||||
-
|
||||
# prnt
|
||||
prntdir = $(hplipdir)/prnt
|
||||
dist_prnt_DATA = prnt/cups.py prnt/__init__.py prnt/ldl.py prnt/pcl.py prnt/colorcal.py
|
@ -1,58 +0,0 @@
|
||||
diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py
|
||||
index 56683fb..031ceec 100755
|
||||
--- a/installer/pluginhandler.py
|
||||
+++ b/installer/pluginhandler.py
|
||||
@@ -185,14 +185,16 @@ class PluginHandle(object):
|
||||
if self.__plugin_conf_file.startswith('file://'):
|
||||
status, filename = utils.download_from_network(self.__plugin_conf_file, local_conf, True)
|
||||
else:
|
||||
- wget = utils.which("wget", True)
|
||||
- if wget:
|
||||
- status, output = utils.run("%s --tries=3 --timeout=60 --output-document=%s %s --cache=off" %(wget, local_conf, self.__plugin_conf_file))
|
||||
+ curl = utils.which("curl", True)
|
||||
+ if curl:
|
||||
+ cmd = "%s --retry 3 --max-time 10 --output %s --location %s" %(curl, local_conf, self.__plugin_conf_file)
|
||||
+ log.debug(cmd)
|
||||
+ status, output = utils.run(cmd)
|
||||
if status:
|
||||
log.error("Plugin download failed with error code = %d" %status)
|
||||
return status, url, check_sum
|
||||
else:
|
||||
- log.error("Please install wget package to download the plugin.")
|
||||
+ log.error("Please install curl package to download the plugin.")
|
||||
return status, url, check_sum
|
||||
except IOError as e:
|
||||
log.error("I/O Error: %s" % e.strerror)
|
||||
@@ -284,18 +284,18 @@ class PluginHandle(object):
|
||||
if src.startswith('file://'):
|
||||
status, filename = utils.download_from_network(src, plugin_file, True)
|
||||
else:
|
||||
- wget = utils.which("wget", True)
|
||||
- if wget:
|
||||
- cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src)
|
||||
+ curl = utils.which("curl", True)
|
||||
+ if curl:
|
||||
+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src)
|
||||
log.debug(cmd)
|
||||
status, output = utils.run(cmd)
|
||||
- log.debug("wget returned: %d" % status)
|
||||
+ log.debug("curl returned: %d" % status)
|
||||
|
||||
#Check whether plugin is accessible in Openprinting.org website otherwise dowload plugin from alternate location.
|
||||
if status != 0 or os_utils.getFileSize(plugin_file) <= 0:
|
||||
src = os.path.join(PLUGIN_FALLBACK_LOCATION, self.__plugin_name)
|
||||
log.info("Plugin is not accessible. Trying to download it from fallback location: [%s]" % src)
|
||||
- cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,src)
|
||||
+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl,self.__plugin_path,src)
|
||||
log.debug(cmd)
|
||||
status, output = utils.run(cmd)
|
||||
|
||||
@@ -323,7 +323,7 @@ class PluginHandle(object):
|
||||
if digsig_url.startswith('file://'):
|
||||
status, filename = utils.download_from_network(digsig_url, digsig_file, True)
|
||||
else:
|
||||
- cmd = "%s --cache=off -P %s %s" % (wget,self.__plugin_path,digsig_url)
|
||||
+ cmd = "%s --create-dirs -O --output-dir %s %s" % (curl, self.__plugin_path,digsig_url)
|
||||
log.debug(cmd)
|
||||
status, output = utils.run(cmd)
|
||||
except IOError as e:
|
@ -1,28 +0,0 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index bb4195c..ddac16a 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -680,6 +680,12 @@ if HPLIP_CLASS_DRIVER
|
||||
filterdir=$(cupsfilterdir)
|
||||
printpluginsdir=$(cupsfilterdir)
|
||||
|
||||
+#
|
||||
+# HP Plugin
|
||||
+#
|
||||
+
|
||||
+pkgplugindir=$(bindir)
|
||||
+pkgplugin_DATA=hp-plugin
|
||||
|
||||
dist_filter_DATA = hpcups hpps dat2drv
|
||||
dist_printplugins_DATA = prnt/plugins/hbpl1-arm32.so prnt/plugins/hbpl1-arm64.so prnt/plugins/hbpl1-x86_32.so prnt/plugins/hbpl1-x86_64.so prnt/plugins/lj-arm32.so prnt/plugins/lj-arm64.so prnt/plugins/lj-x86_32.so prnt/plugins/lj-x86_64.so
|
||||
diff --git a/configure.in b/configure.in
|
||||
index f8f1a28..7fa5d12 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -801,5 +801,5 @@ AC_SUBST(udev_sysfs_rules)
|
||||
AC_SUBST(epm_class_driver)
|
||||
AC_SUBST(epm_class_install)
|
||||
|
||||
-AC_CONFIG_FILES(Makefile hplip.conf hplip.desktop hp-uiscan.desktop hplip-systray.desktop prnt/drv/hpijs.drv prnt/drv/hpcups.drv hplip.list data/policykit/com.hp.hplip.service)
|
||||
+AC_CONFIG_FILES(Makefile hplip.conf hplip.desktop hp-uiscan.desktop hplip-systray.desktop prnt/drv/hpijs.drv prnt/drv/hpcups.drv hplip.list data/policykit/com.hp.hplip.service hp-plugin)
|
||||
AC_OUTPUT
|
@ -1,26 +0,0 @@
|
||||
diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py
|
||||
index 1af8d85..5c498ab 100755
|
||||
--- a/installer/pluginhandler.py
|
||||
+++ b/installer/pluginhandler.py
|
||||
@@ -403,7 +403,20 @@ class PluginHandle(object):
|
||||
log.error("Target file %s does not exist. File copy failed." % trg)
|
||||
continue
|
||||
else:
|
||||
- os.chmod(trg, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
|
||||
+ if trg == '/etc/udev/rules.d/S99-2000S1.rules' or \
|
||||
+ trg == '/etc/udev/rules.d/40-libsane.rules':
|
||||
+ os.chmod(trg, 0o644)
|
||||
+ with open(trg, 'r') as udev_f:
|
||||
+ content = udev_f.read()
|
||||
+
|
||||
+ content = content.replace('libsane_rules_end', 'libsane_usb_rules_end')
|
||||
+ content = content.replace('GROUP="scanner", ', '')
|
||||
+
|
||||
+ with open(trg, 'w') as udev_f:
|
||||
+ udev_f.write(content)
|
||||
+
|
||||
+ else:
|
||||
+ os.chmod(trg, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
|
||||
|
||||
if link:
|
||||
if os.path.exists(link):
|
@ -1,17 +0,0 @@
|
||||
prnt/pserror.c: Replace an implicit int with an explicit int
|
||||
|
||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||
|
||||
diff --git a/prnt/hpps/pserror.c b/prnt/hpps/pserror.c
|
||||
index 114d7e1b5fa364fb..493b49c27917a7e6 100644
|
||||
--- a/prnt/hpps/pserror.c
|
||||
+++ b/prnt/hpps/pserror.c
|
||||
@@ -24,7 +24,7 @@ extern char *program ; /* Defined by main program, giving program name */
|
||||
void message(int flags, char *format, ...)
|
||||
{
|
||||
va_list args ;
|
||||
- static column = 0 ; /* current screen column for message wrap */
|
||||
+ static int column = 0 ; /* current screen column for message wrap */
|
||||
char msgbuf[MAX_MESSAGE] ; /* buffer in which to put the message */
|
||||
char *bufptr = msgbuf ; /* message buffer pointer */
|
||||
|
@ -1,19 +0,0 @@
|
||||
scam/sane/hpaio.c: Include orblite.h for more function prototypes
|
||||
|
||||
Otherwise the build fails with compilers which do not support
|
||||
implicit function declarations.
|
||||
|
||||
Submitted upstream: <https://bugs.launchpad.net/hplip/+bug/1997875>
|
||||
|
||||
diff --git a/scan/sane/hpaio.c b/scan/sane/hpaio.c
|
||||
index d342626822fc2190..57d1ddea32fb5816 100644
|
||||
--- a/scan/sane/hpaio.c
|
||||
+++ b/scan/sane/hpaio.c
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "sclpml.h"
|
||||
#include "escl.h"
|
||||
#include "io.h"
|
||||
+#include "orblite.h"
|
||||
#include "orblitei.h"
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff --git a/scan/sane/orblite.c b/scan/sane/orblite.c
|
||||
index ba86640..2eb7aba 100644
|
||||
--- a/scan/sane/orblite.c
|
||||
+++ b/scan/sane/orblite.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "orblitei.h"
|
||||
#include "orblite.h"//Added New
|
||||
#include <math.h>
|
||||
+#include <dlfcn.h>
|
||||
#include "utils.h"
|
||||
#include "io.h"
|
||||
|
||||
@@ -195,7 +196,7 @@ bugout:
|
||||
|
||||
static int bb_unload(SANE_THandle ps)
|
||||
{
|
||||
- _DBG("Calling orblite bb_unload: \n");
|
||||
+ DBG("Calling orblite bb_unload: \n");
|
||||
if (ps->bb_handle)
|
||||
{
|
||||
dlclose(ps->bb_handle);
|
@ -1,16 +0,0 @@
|
||||
Switch the whole libsane-hpaio to get proper definition of strcasestr() used in
|
||||
sclpml.c
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 15d953a..7105f74 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -73,7 +73,7 @@ endif
|
||||
# The following is a interlibrary dependency that must be compiled first.
|
||||
libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups -ldl
|
||||
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
|
||||
-libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
|
||||
+libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol -D_GNU_SOURCE
|
||||
|
||||
if NETWORK_BUILD
|
||||
libsane_hpaio_la_LIBADD += libhpdiscovery.la
|
@ -0,0 +1,93 @@
|
||||
diff --git a/copier/copier.py b/copier/copier.py
|
||||
index a595baa..7794f48 100644
|
||||
--- a/copier/copier.py
|
||||
+++ b/copier/copier.py
|
||||
@@ -73,13 +73,13 @@ class PMLCopyDevice(device.Device):
|
||||
|
||||
def isCopyActive(self):
|
||||
if self.copy_thread is not None:
|
||||
- return self.copy_thread.isAlive()
|
||||
+ return self.copy_thread.is_alive()
|
||||
else:
|
||||
return False
|
||||
|
||||
def waitForCopyThread(self):
|
||||
if self.copy_thread is not None and \
|
||||
- self.copy_thread.isAlive():
|
||||
+ self.copy_thread.is_alive():
|
||||
|
||||
self.copy_thread.join()
|
||||
|
||||
diff --git a/fax/fax.py b/fax/fax.py
|
||||
index 3d69226..0878a64 100644
|
||||
--- a/fax/fax.py
|
||||
+++ b/fax/fax.py
|
||||
@@ -478,13 +478,13 @@ class FaxDevice(device.Device):
|
||||
|
||||
def isSendFaxActive(self):
|
||||
if self.send_fax_thread is not None:
|
||||
- return self.send_fax_thread.isAlive()
|
||||
+ return self.send_fax_thread.is_alive()
|
||||
else:
|
||||
return False
|
||||
|
||||
def waitForSendFaxThread(self):
|
||||
if self.send_fax_thread is not None and \
|
||||
- self.send_fax_thread.isAlive():
|
||||
+ self.send_fax_thread.is_alive():
|
||||
|
||||
try:
|
||||
self.send_fax_thread.join()
|
||||
diff --git a/fax/pmlfax.py b/fax/pmlfax.py
|
||||
index b68ff6a..b1020d0 100644
|
||||
--- a/fax/pmlfax.py
|
||||
+++ b/fax/pmlfax.py
|
||||
@@ -179,13 +179,13 @@ class PMLFaxDevice(FaxDevice):
|
||||
|
||||
def isUploadLogActive(self):
|
||||
if self.upload_log_thread is not None:
|
||||
- return self.upload_log_thread.isAlive()
|
||||
+ return self.upload_log_thread.is_alive()
|
||||
else:
|
||||
return False
|
||||
|
||||
def waitForUploadLogThread(self):
|
||||
if self.upload_log_thread is not None and \
|
||||
- self.upload_log_thread.isAlive():
|
||||
+ self.upload_log_thread.is_alive():
|
||||
|
||||
self.upload_log_thread.join()
|
||||
|
||||
diff --git a/scan/sane.py b/scan/sane.py
|
||||
index b6c4acd..e8f8db8 100755
|
||||
--- a/scan/sane.py
|
||||
+++ b/scan/sane.py
|
||||
@@ -378,14 +378,14 @@ class ScanDevice:
|
||||
|
||||
def isScanActive(self):
|
||||
if self.scan_thread is not None:
|
||||
- return self.scan_thread.isAlive() and self.scan_thread.scan_active
|
||||
+ return self.scan_thread.is_alive() and self.scan_thread.scan_active
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def waitForScanDone(self):
|
||||
if self.scan_thread is not None and \
|
||||
- self.scan_thread.isAlive() and \
|
||||
+ self.scan_thread.is_alive() and \
|
||||
self.scan_thread.scan_active:
|
||||
|
||||
try:
|
||||
@@ -398,9 +398,9 @@ class ScanDevice:
|
||||
#time.sleep(0.5)
|
||||
if self.scan_thread is not None:
|
||||
while True:
|
||||
- #print self.scan_thread.isAlive()
|
||||
+ #print self.scan_thread.is_alive()
|
||||
#print self.scan_thread.scan_active
|
||||
- if self.scan_thread.isAlive() and \
|
||||
+ if self.scan_thread.is_alive() and \
|
||||
self.scan_thread.scan_active:
|
||||
return
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff --git a/prnt/hpcups/CommonDefinitions.h b/prnt/hpcups/CommonDefinitions.h
|
||||
index 082aec9..86763d4 100644
|
||||
--- a/prnt/hpcups/CommonDefinitions.h
|
||||
+++ b/prnt/hpcups/CommonDefinitions.h
|
||||
@@ -48,7 +48,6 @@
|
||||
#include <syslog.h>
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
-#include <sys/timeb.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _GNU_SOURCE
|
@ -1,398 +0,0 @@
|
||||
diff --git a/base/LedmWifi.py b/base/LedmWifi.py
|
||||
index f63a050..074d5a2 100644
|
||||
--- a/base/LedmWifi.py
|
||||
+++ b/base/LedmWifi.py
|
||||
@@ -31,7 +31,7 @@ from .g import *
|
||||
from . import device, utils
|
||||
from .sixext import to_bytes_utf8
|
||||
|
||||
-http_result_pat = re.compile("""HTTP/\d.\d\s(\d+)""", re.I)
|
||||
+http_result_pat = re.compile(r"""HTTP/\d.\d\s(\d+)""", re.I)
|
||||
HTTP_OK = 200
|
||||
HTTP_ACCEPTED = 202
|
||||
HTTP_NOCONTENT = 204
|
||||
diff --git a/base/device.py b/base/device.py
|
||||
index fbe6c34..a551403 100644
|
||||
--- a/base/device.py
|
||||
+++ b/base/device.py
|
||||
@@ -47,7 +47,7 @@ from . import models, mdns, slp, avahi
|
||||
from .strings import *
|
||||
from .sixext import PY3, to_bytes_utf8, to_unicode, to_string_latin, to_string_utf8, xStringIO
|
||||
|
||||
-http_result_pat = re.compile("""HTTP/\d.\d\s(\d+)""", re.I)
|
||||
+http_result_pat = re.compile(r"""HTTP/\d.\d\s(\d+)""", re.I)
|
||||
|
||||
HTTP_OK = 200
|
||||
HTTP_ERROR = 500
|
||||
diff --git a/base/g.py b/base/g.py
|
||||
index 96b3131..023aeea 100644
|
||||
--- a/base/g.py
|
||||
+++ b/base/g.py
|
||||
@@ -302,7 +302,7 @@ prop.hpcups_build = to_bool(sys_conf.get('configure', 'hpcups-install', '0'))
|
||||
prop.hpijs_build = to_bool(sys_conf.get('configure', 'hpijs-install', '0'))
|
||||
|
||||
# Spinner, ala Gentoo Portage
|
||||
-spinner = "\|/-\|/-"
|
||||
+spinner = r"\|/-\|/-"
|
||||
spinpos = 0
|
||||
enable_spinner = True
|
||||
|
||||
@@ -352,7 +352,7 @@ def check_extension_module_env(ext_mod):
|
||||
log.error('%s not present in the system. Please re-install HPLIP.' %ext_mod)
|
||||
sys.exit(1)
|
||||
|
||||
- m = re.search('python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found
|
||||
+ m = re.search(r'python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found
|
||||
ext_ver = xint(m.group(1))
|
||||
|
||||
if ext_ver[0] == 3:
|
||||
diff --git a/base/logger.py b/base/logger.py
|
||||
index dd92a9c..68e4f13 100644
|
||||
--- a/base/logger.py
|
||||
+++ b/base/logger.py
|
||||
@@ -437,10 +437,10 @@ class Logger(object):
|
||||
start = start + " "
|
||||
number_chars = number_chars + 1
|
||||
try:
|
||||
- elem_start = re.findall("(\<\W{0,1}\w+) ?", line)[0]
|
||||
- elem_finished = re.findall("([?|\]\]]*\>)", line)[0]
|
||||
+ elem_start = re.findall(r"(\<\W{0,1}\w+) ?", line)[0]
|
||||
+ elem_finished = re.findall(r"([?|\]\]]*\>)", line)[0]
|
||||
#should not have *
|
||||
- attrs = re.findall("(\S*?\=\".*?\")", line)
|
||||
+ attrs = re.findall(r"(\S*?\=\".*?\")", line)
|
||||
#output.write(start + elem_start)
|
||||
self.log(start+elem_start, level, False)
|
||||
number_chars = len(start + elem_start)
|
||||
diff --git a/base/models.py b/base/models.py
|
||||
index dc6cc39..48dd2ef 100644
|
||||
--- a/base/models.py
|
||||
+++ b/base/models.py
|
||||
@@ -35,7 +35,7 @@ except ImportError:
|
||||
datetime = None
|
||||
|
||||
|
||||
-pat_prod_num = re.compile("""(\d+)""", re.I)
|
||||
+pat_prod_num = re.compile(r"""(\d+)""", re.I)
|
||||
|
||||
TYPE_UNKNOWN = 0
|
||||
TYPE_STRING = 1
|
||||
@@ -427,25 +427,25 @@ class ModelData:
|
||||
}
|
||||
|
||||
self.RE_FIELD_TYPES = {
|
||||
- re.compile('^r(\d+)-agent(\d+)-kind', re.IGNORECASE) : TYPE_INT,
|
||||
- re.compile('^r(\d+)-agent(\d+)-type', re.IGNORECASE) : TYPE_INT,
|
||||
- re.compile('^r(\d+)-agent(\d+)-sku', re.IGNORECASE) : TYPE_STR,
|
||||
- re.compile('^agent(\d+)-desc', re.IGNORECASE) : TYPE_STR,
|
||||
- re.compile('^agent(\d+)-virgin', re.IGNORECASE) : TYPE_BOOL,
|
||||
- re.compile('^agent(\d+)-dvc', re.IGNORECASE) : TYPE_INT,
|
||||
- re.compile('^agent(\d+)-kind', re.IGNORECASE) : TYPE_INT,
|
||||
- re.compile('^agent(\d+)-type', re.IGNORECASE) : TYPE_INT,
|
||||
- re.compile('^agent(\d+)-id', re.IGNORECASE) : TYPE_INT,
|
||||
- re.compile('^agent(\d+)-hp-ink', re.IGNORECASE) : TYPE_BOOL,
|
||||
- re.compile('^agent(\d+)-health-desc', re.IGNORECASE) : TYPE_STR,
|
||||
- re.compile('^agent(\d+)-health$', re.IGNORECASE) : TYPE_INT,
|
||||
- re.compile('^agent(\d+)-known', re.IGNORECASE) : TYPE_BOOL,
|
||||
- re.compile('^agent(\d+)-level', re.IGNORECASE) : TYPE_INT,
|
||||
- re.compile('^agent(\d+)-ack', re.IGNORECASE) : TYPE_BOOL,
|
||||
- re.compile('^agent(\d+)-sku', re.IGNORECASE) : TYPE_STR,
|
||||
- re.compile('^in-tray(\d+)', re.IGNORECASE) : TYPE_BOOL,
|
||||
- re.compile('^out-tray(\d+)', re.IGNORECASE) : TYPE_BOOL,
|
||||
- re.compile('^model(\d+)', re.IGNORECASE) : TYPE_STR,
|
||||
+ re.compile(r'^r(\d+)-agent(\d+)-kind', re.IGNORECASE) : TYPE_INT,
|
||||
+ re.compile(r'^r(\d+)-agent(\d+)-type', re.IGNORECASE) : TYPE_INT,
|
||||
+ re.compile(r'^r(\d+)-agent(\d+)-sku', re.IGNORECASE) : TYPE_STR,
|
||||
+ re.compile(r'^agent(\d+)-desc', re.IGNORECASE) : TYPE_STR,
|
||||
+ re.compile(r'^agent(\d+)-virgin', re.IGNORECASE) : TYPE_BOOL,
|
||||
+ re.compile(r'^agent(\d+)-dvc', re.IGNORECASE) : TYPE_INT,
|
||||
+ re.compile(r'^agent(\d+)-kind', re.IGNORECASE) : TYPE_INT,
|
||||
+ re.compile(r'^agent(\d+)-type', re.IGNORECASE) : TYPE_INT,
|
||||
+ re.compile(r'^agent(\d+)-id', re.IGNORECASE) : TYPE_INT,
|
||||
+ re.compile(r'^agent(\d+)-hp-ink', re.IGNORECASE) : TYPE_BOOL,
|
||||
+ re.compile(r'^agent(\d+)-health-desc', re.IGNORECASE) : TYPE_STR,
|
||||
+ re.compile(r'^agent(\d+)-health$', re.IGNORECASE) : TYPE_INT,
|
||||
+ re.compile(r'^agent(\d+)-known', re.IGNORECASE) : TYPE_BOOL,
|
||||
+ re.compile(r'^agent(\d+)-level', re.IGNORECASE) : TYPE_INT,
|
||||
+ re.compile(r'^agent(\d+)-ack', re.IGNORECASE) : TYPE_BOOL,
|
||||
+ re.compile(r'^agent(\d+)-sku', re.IGNORECASE) : TYPE_STR,
|
||||
+ re.compile(r'^in-tray(\d+)', re.IGNORECASE) : TYPE_BOOL,
|
||||
+ re.compile(r'^out-tray(\d+)', re.IGNORECASE) : TYPE_BOOL,
|
||||
+ re.compile(r'^model(\d+)', re.IGNORECASE) : TYPE_STR,
|
||||
}
|
||||
|
||||
self.TYPE_CACHE = {}
|
||||
diff --git a/base/password.py b/base/password.py
|
||||
index 259bf82..a4ed107 100644
|
||||
--- a/base/password.py
|
||||
+++ b/base/password.py
|
||||
@@ -167,8 +167,8 @@ class Password(object):
|
||||
|
||||
elif i == 1: # TIMEOUT
|
||||
if('true' in cmd and self.__password_prompt_str == ""): # sudo true or su -c "true"
|
||||
- cb = cb.replace("[", "\[")
|
||||
- cb = cb.replace("]", "\]")
|
||||
+ cb = cb.replace("[", r"\[")
|
||||
+ cb = cb.replace("]", r"\]")
|
||||
|
||||
self.__password_prompt_str = cb
|
||||
try:
|
||||
diff --git a/base/queues.py b/base/queues.py
|
||||
index 0818574..8625f53 100755
|
||||
--- a/base/queues.py
|
||||
+++ b/base/queues.py
|
||||
@@ -46,7 +46,7 @@ HPPS = 3
|
||||
HPOTHER = 4
|
||||
|
||||
DEVICE_URI_PATTERN = re.compile(r"""(.*):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*)|zc=(\S+))(?:&port=(\d))?""", re.I)
|
||||
-NICKNAME_PATTERN = re.compile(b'''\*NickName:\s*\"(.*)"''', re.MULTILINE)
|
||||
+NICKNAME_PATTERN = re.compile(r'''\*NickName:\s*\"(.*)"''', re.MULTILINE)
|
||||
NET_PATTERN = re.compile(r"""(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})""")
|
||||
NET_ZC_PATTERN = re.compile(r'''zc=(.*)''',re.IGNORECASE)
|
||||
NET_OTHER_PATTERN = re.compile(r'''(.*)://(.*)''',re.IGNORECASE)
|
||||
@@ -149,7 +149,7 @@ def parseQueues(mode):
|
||||
desc=''
|
||||
else:
|
||||
try:
|
||||
- desc = to_string_utf8( NICKNAME_PATTERN.search(fileptr).group(1) )
|
||||
+ desc = to_string_utf8( NICKNAME_PATTERN.search(fileptr.decode('utf-8')).group(1) )
|
||||
except AttributeError:
|
||||
desc = ''
|
||||
|
||||
diff --git a/base/status.py b/base/status.py
|
||||
index 37c774e..01f455d 100644
|
||||
--- a/base/status.py
|
||||
+++ b/base/status.py
|
||||
@@ -1341,7 +1341,7 @@ def MapPJLErrorCode(error_code, str_code=None):
|
||||
return status_code
|
||||
|
||||
|
||||
-pjl_code_pat = re.compile("""^CODE\s*=\s*(\d.*)$""", re.IGNORECASE)
|
||||
+pjl_code_pat = re.compile(r"""^CODE\s*=\s*(\d.*)$""", re.IGNORECASE)
|
||||
|
||||
|
||||
|
||||
diff --git a/base/tui.py b/base/tui.py
|
||||
index 0f90f92..3b36c65 100644
|
||||
--- a/base/tui.py
|
||||
+++ b/base/tui.py
|
||||
@@ -217,7 +217,7 @@ class ProgressMeter(object):
|
||||
self.progress = 0
|
||||
self.prompt = prompt
|
||||
self.prev_length = 0
|
||||
- self.spinner = "\|/-\|/-*"
|
||||
+ self.spinner = r"\|/-\|/-*"
|
||||
self.spinner_pos = 0
|
||||
self.max_size = ttysize()[1] - len(prompt) - 25
|
||||
self.update(0)
|
||||
diff --git a/base/utils.py b/base/utils.py
|
||||
index 2b631ce..2fb57c4 100644
|
||||
--- a/base/utils.py
|
||||
+++ b/base/utils.py
|
||||
@@ -148,7 +148,7 @@ def get_cups_systemgroup_list():
|
||||
return lis
|
||||
|
||||
try:
|
||||
- lis = ((re.findall('SystemGroup [\w* ]*',fp.read()))[0].replace('SystemGroup ','')).split(' ')
|
||||
+ lis = ((re.findall(r'SystemGroup [\w* ]*',fp.read()))[0].replace('SystemGroup ','')).split(' ')
|
||||
except IndexError:
|
||||
return lis
|
||||
|
||||
@@ -1597,7 +1597,7 @@ def mixin(cls):
|
||||
# ------------------------- Usage Help
|
||||
USAGE_OPTIONS = ("[OPTIONS]", "", "heading", False)
|
||||
USAGE_LOGGING1 = ("Set the logging level:", "-l<level> or --logging=<level>", 'option', False)
|
||||
-USAGE_LOGGING2 = ("", "<level>: none, info\*, error, warn, debug (\*default)", "option", False)
|
||||
+USAGE_LOGGING2 = ("", r"<level>: none, info\*, error, warn, debug (\*default)", "option", False)
|
||||
USAGE_LOGGING3 = ("Run in debug mode:", "-g (same as option: -ldebug)", "option", False)
|
||||
USAGE_LOGGING_PLAIN = ("Output plain text only:", "-t", "option", False)
|
||||
USAGE_ARGS = ("[PRINTER|DEVICE-URI]", "", "heading", False)
|
||||
@@ -1605,13 +1605,13 @@ USAGE_ARGS2 = ("[PRINTER]", "", "heading", False)
|
||||
USAGE_DEVICE = ("To specify a device-URI:", "-d<device-uri> or --device=<device-uri>", "option", False)
|
||||
USAGE_PRINTER = ("To specify a CUPS printer:", "-p<printer> or --printer=<printer>", "option", False)
|
||||
USAGE_BUS1 = ("Bus to probe (if device not specified):", "-b<bus> or --bus=<bus>", "option", False)
|
||||
-USAGE_BUS2 = ("", "<bus>: cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)", 'option', False)
|
||||
+USAGE_BUS2 = ("", r"<bus>: cups\*, usb\*, net, bt, fw, par\* (\*defaults) (Note: bt and fw not supported in this release.)", 'option', False)
|
||||
USAGE_HELP = ("This help information:", "-h or --help", "option", True)
|
||||
USAGE_SPACE = ("", "", "space", False)
|
||||
USAGE_EXAMPLES = ("Examples:", "", "heading", False)
|
||||
USAGE_NOTES = ("Notes:", "", "heading", False)
|
||||
USAGE_STD_NOTES1 = ("If device or printer is not specified, the local device bus is probed and the program enters interactive mode.", "", "note", False)
|
||||
-USAGE_STD_NOTES2 = ("If -p\* is specified, the default CUPS printer will be used.", "", "note", False)
|
||||
+USAGE_STD_NOTES2 = (r"If -p\* is specified, the default CUPS printer will be used.", "", "note", False)
|
||||
USAGE_SEEALSO = ("See Also:", "", "heading", False)
|
||||
USAGE_LANGUAGE = ("Set the language:", "--loc=<lang> or --lang=<lang>. Use --loc=? or --lang=? to see a list of available language codes.", "option", False)
|
||||
USAGE_LANGUAGE2 = ("Set the language:", "--lang=<lang>. Use --lang=? to see a list of available language codes.", "option", False)
|
||||
@@ -1839,7 +1839,7 @@ encoding: utf8
|
||||
|
||||
elif typ == 'man':
|
||||
log.info('.TH "%s" 1 "%s" Linux "User Manuals"' % (crumb, version))
|
||||
- log.info(".SH NAME\n%s \- %s" % (crumb, title))
|
||||
+ log.info(r".SH NAME\n%s \- %s" % (crumb, title))
|
||||
|
||||
for line in text_list:
|
||||
text1, text2, format, trailing_space = line
|
||||
@@ -1938,7 +1938,7 @@ def unescape(text):
|
||||
except KeyError:
|
||||
pass
|
||||
return text # leave as is
|
||||
- return re.sub("&#?\w+;", fixup, text)
|
||||
+ return re.sub(r"&#?\w+;", fixup, text)
|
||||
|
||||
|
||||
# Adds HTML or XML character references and entities from a text string
|
||||
@@ -1991,7 +1991,7 @@ def Is_HPLIP_older_version(installed_version, available_version):
|
||||
log.debug("HPLIP Installed_version=%s Available_version=%s"%(installed_version,available_version))
|
||||
cnt = 0
|
||||
Is_older = False
|
||||
- pat=re.compile('''(\d{1,})([a-z]{1,})''')
|
||||
+ pat=re.compile(r'''(\d{1,})([a-z]{1,})''')
|
||||
try:
|
||||
while cnt <len(installed_array) and cnt <len(available_array):
|
||||
|
||||
diff --git a/check.py b/check.py
|
||||
index 284b88e..86ca832 100755
|
||||
--- a/check.py
|
||||
+++ b/check.py
|
||||
@@ -627,7 +627,7 @@ class DependenciesCheck(object):
|
||||
status, output = utils.run("%s -d03f0:" % lsusb)
|
||||
|
||||
if output:
|
||||
- lsusb_pat = re.compile("""^Bus\s([0-9a-fA-F]{3,3})\sDevice\s([0-9a-fA-F]{3,3}):\sID\s([0-9a-fA-F]{4,4}):([0-9a-fA-F]{4,4})(.*)""", re.IGNORECASE)
|
||||
+ lsusb_pat = re.compile(r"""^Bus\s([0-9a-fA-F]{3,3})\sDevice\s([0-9a-fA-F]{3,3}):\sID\s([0-9a-fA-F]{4,4}):([0-9a-fA-F]{4,4})(.*)""", re.IGNORECASE)
|
||||
log.debug(output)
|
||||
try:
|
||||
hpmudext = utils.import_ext('hpmudext')
|
||||
@@ -682,7 +682,7 @@ class DependenciesCheck(object):
|
||||
|
||||
out =''
|
||||
for g in getfacl_out_list:
|
||||
- if 'getfacl' not in g and '' is not g and 'file' not in g:
|
||||
+ if 'getfacl' not in g and '' != g and 'file' not in g:
|
||||
pat = re.compile('''.*:(.*)''')
|
||||
if pat.search(g):
|
||||
out = out +' '+ pat.search(g).group(1)
|
||||
diff --git a/fax/soapfax.py b/fax/soapfax.py
|
||||
index 9865726..344cb34 100644
|
||||
--- a/fax/soapfax.py
|
||||
+++ b/fax/soapfax.py
|
||||
@@ -42,7 +42,7 @@ from base.sixext import to_bytes_utf8
|
||||
|
||||
# **************************************************************************** #
|
||||
|
||||
-http_result_pat = re.compile("""HTTP/\d.\d\s(\d+)""", re.I)
|
||||
+http_result_pat = re.compile(r"""HTTP/\d.\d\s(\d+)""", re.I)
|
||||
|
||||
|
||||
TIME_FORMAT_AM_PM = 1
|
||||
diff --git a/installer/dcheck.py b/installer/dcheck.py
|
||||
index a1a4f02..4dbee59 100644
|
||||
--- a/installer/dcheck.py
|
||||
+++ b/installer/dcheck.py
|
||||
@@ -33,8 +33,8 @@ from base.g import *
|
||||
from base import utils, services
|
||||
from base.sixext import to_bytes_utf8
|
||||
|
||||
-ver1_pat = re.compile("""(\d+\.\d+\.\d+)""", re.IGNORECASE)
|
||||
-ver_pat = re.compile("""(\d+.\d+)""", re.IGNORECASE)
|
||||
+ver1_pat = re.compile(r"""(\d+\.\d+\.\d+)""", re.IGNORECASE)
|
||||
+ver_pat = re.compile(r"""(\d+.\d+)""", re.IGNORECASE)
|
||||
PID = 0
|
||||
CMDLINE = 1
|
||||
|
||||
@@ -358,7 +358,7 @@ def get_xsane_version():
|
||||
|
||||
|
||||
if output:
|
||||
- xsane_ver_pat =re.compile('''xsane-(\d{1,}\.\d{1,}).*''')
|
||||
+ xsane_ver_pat =re.compile(r'''xsane-(\d{1,}\.\d{1,}).*''')
|
||||
xsane_ver_info = output.splitlines()[0]
|
||||
if xsane_ver_pat.search(xsane_ver_info):
|
||||
installed_ver = xsane_ver_pat.search(xsane_ver_info).group(1)
|
||||
diff --git a/makeuri.py b/makeuri.py
|
||||
index 4a10de8..6343e31 100755
|
||||
--- a/makeuri.py
|
||||
+++ b/makeuri.py
|
||||
@@ -46,7 +46,7 @@ USAGE = [ (__doc__, "", "name", True),
|
||||
("DEVNODE (parallel only):", '"/dev/parportX", X=0,1,2,...', "option", False),
|
||||
("SERIAL NO. (usb and parallel only):", '"serial no."', "option", True),
|
||||
utils.USAGE_OPTIONS,
|
||||
- ("To specify the port on a multi-port JetDirect:", "-p<port> or --port=<port> (Valid values are 1\*, 2, and 3. \*default)", "option", False),
|
||||
+ ("To specify the port on a multi-port JetDirect:", r"-p<port> or --port=<port> (Valid values are 1\*, 2, and 3. \*default)", "option", False),
|
||||
("Show the CUPS URI only (quiet mode):", "-c or --cups", "option", False),
|
||||
("Show the SANE URI only (quiet mode):", "-s or --sane", "option", False),
|
||||
("Show the HP Fax URI only (quiet mode):", "-f or --fax", "option", False),
|
||||
diff --git a/prnt/cups.py b/prnt/cups.py
|
||||
index 1ea3099..78b8adc 100644
|
||||
--- a/prnt/cups.py
|
||||
+++ b/prnt/cups.py
|
||||
@@ -168,7 +168,7 @@ CUPS_ERROR_BAD_NAME = 0x0f00
|
||||
CUPS_ERROR_BAD_PARAMETERS = 0x0f01
|
||||
|
||||
nickname_pat = re.compile(r'''\*NickName:\s*\"(.*)"''', re.MULTILINE)
|
||||
-pat_cups_error_log = re.compile("""^loglevel\s?(debug|debug2|warn|info|error|none)""", re.I)
|
||||
+pat_cups_error_log = re.compile(r"""^loglevel\s?(debug|debug2|warn|info|error|none)""", re.I)
|
||||
ppd_pat = re.compile(r'''.*hp-(.*?)(-.*)*\.ppd.*''', re.I)
|
||||
ppd_pat1 = re.compile(r'''.*hp-(.*?)(_.*)*\.ppd.*''', re.I)
|
||||
|
||||
diff --git a/probe.py b/probe.py
|
||||
index 2041fb6..2b43ece 100755
|
||||
--- a/probe.py
|
||||
+++ b/probe.py
|
||||
@@ -42,11 +42,11 @@ USAGE = [(__doc__, "", "name", True),
|
||||
("Usage: %s [OPTIONS]" % __mod__, "", "summary", True),
|
||||
utils.USAGE_OPTIONS,
|
||||
("Bus to probe:", "-b<bus> or --bus=<bus>", "option", False),
|
||||
- ("", "<bus>: cups, usb\*, net, bt, fw, par (\*default) (Note: bt and fw not supported in this release.)", "option", False),
|
||||
+ ("", r"<bus>: cups, usb\*, net, bt, fw, par (\*default) (Note: bt and fw not supported in this release.)", "option", False),
|
||||
("Set Time to Live (TTL):", "-t<ttl> or --ttl=<ttl> (Default is 4).", "option", False),
|
||||
("Set timeout:", "-o<timeout in secs.> or --timeout=<timeout is secs.>", "option", False),
|
||||
("Filter by functionality:", "-e<filter list> or --filter=<filter list>", "option", False),
|
||||
- ("", "<filter list>: comma separated list of one or more of: scan, pcard, fax, copy, or none\*. (\*none is the default)", "option", False),
|
||||
+ ("", r"<filter list>: comma separated list of one or more of: scan, pcard, fax, copy, or none\*. (\*none is the default)", "option", False),
|
||||
("Search:", "-s<search re> or --search=<search re>", "option", False),
|
||||
("", "<search re> must be a valid regular expression (not case sensitive)", "option", False),
|
||||
("Network discovery method:", "-m<method> or --method=<method>: <method> is 'slp'* or 'mdns'.", "option", False),
|
||||
diff --git a/scan.py b/scan.py
|
||||
index 0bfa6f5..27b8c2e 100755
|
||||
--- a/scan.py
|
||||
+++ b/scan.py
|
||||
@@ -249,9 +249,9 @@ try:
|
||||
extra_options=[utils.USAGE_SPACE,
|
||||
("[OPTIONS] (General)", "", "header", False),
|
||||
("Scan destinations:", "-s<dest_list> or --dest=<dest_list>", "option", False),
|
||||
- ("", "where <dest_list> is a comma separated list containing one or more of: 'file'\*, ", "option", False),
|
||||
+ ("", r"where <dest_list> is a comma separated list containing one or more of: 'file'\*, ", "option", False),
|
||||
("", "'viewer', 'editor', 'pdf', or 'print'. Use only commas between values, no spaces.", "option", False),
|
||||
- ("Scan mode:", "-m<mode> or --mode=<mode>. Where <mode> is 'gray'\*, 'color' or 'lineart'.", "option", False),
|
||||
+ ("Scan mode:", r"-m<mode> or --mode=<mode>. Where <mode> is 'gray'\*, 'color' or 'lineart'.", "option", False),
|
||||
("Scanning resolution:", "-r<resolution_in_dpi> or --res=<resolution_in_dpi> or --resolution=<resolution_in_dpi>", "option", False),
|
||||
("", "where 300 is default.", "option", False),
|
||||
("Image resize:", "--resize=<scale_in_%> (min=1%, max=400%, default=100%)", "option", False),
|
||||
@@ -268,7 +268,7 @@ try:
|
||||
utils.USAGE_SPACE,
|
||||
("[OPTIONS] (Scan area)", "", "header", False),
|
||||
("Specify the units for area/box measurements:", "-t<units> or --units=<units>", "option", False),
|
||||
- ("", "where <units> is 'mm'\*, 'cm', 'in', 'px', or 'pt' ('mm' is default).", "option", False),
|
||||
+ ("", r"where <units> is 'mm'\*, 'cm', 'in', 'px', or 'pt' ('mm' is default).", "option", False),
|
||||
("Scan area:", "-a<tlx>,<tly>,<brx>,<bry> or --area=<tlx>,<tly>,<brx>,<bry>", "option", False),
|
||||
("", "Coordinates are relative to the upper left corner of the scan area.", "option", False),
|
||||
("", "Units for tlx, tly, brx, and bry are specified by -t/--units (default is 'mm').", "option", False),
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 98f57fd..1a74d6d 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -79,11 +79,11 @@ USAGE = [ (__doc__, "", "name", True),
|
||||
utils.USAGE_SPACE,
|
||||
utils.USAGE_OPTIONS,
|
||||
("Automatic mode:", "-a or --auto (-i mode only)", "option", False),
|
||||
- ("To specify the port on a multi-port JetDirect:", "--port=<port> (Valid values are 1\*, 2, and 3. \*default)", "option", False),
|
||||
+ ("To specify the port on a multi-port JetDirect:", r"--port=<port> (Valid values are 1\*, 2, and 3. \*default)", "option", False),
|
||||
("No testpage in automatic mode:", "-x (-i mode only)", "option", False),
|
||||
("To specify a CUPS printer queue name:", "-p<printer> or --printer=<printer> (-i mode only)", "option", False),
|
||||
("To specify a CUPS fax queue name:", "-f<fax> or --fax=<fax> (-i mode only)", "option", False),
|
||||
- ("Type of queue(s) to install:", "-t<typelist> or --type=<typelist>. <typelist>: print*, fax\* (\*default) (-i mode only)", "option", False),
|
||||
+ ("Type of queue(s) to install:", r"-t<typelist> or --type=<typelist>. <typelist>: print*, fax\* (\*default) (-i mode only)", "option", False),
|
||||
("To specify the device URI to install:", "-d<device> or --device=<device> (--qt4 mode only)", "option", False),
|
||||
("Remove printers or faxes instead of setting-up:", "-r or --rm or --remove", "option", False),
|
||||
utils.USAGE_LANGUAGE,
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue