30 lines
1.5 KiB
Diff
30 lines
1.5 KiB
Diff
diff -up system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp system-config-printer-1.2.2/asyncpk1.py
|
|
--- system-config-printer-1.2.2/asyncpk1.py.cupspk-fileget-tmp 2010-05-07 15:19:03.000000000 +0100
|
|
+++ system-config-printer-1.2.2/asyncpk1.py 2010-05-13 13:00:57.759093485 +0100
|
|
@@ -153,7 +153,10 @@ class _WriteToTmpFile:
|
|
def __init__ (self, kwds, reply_handler, error_handler):
|
|
self._reply_handler = reply_handler
|
|
self._error_handler = error_handler
|
|
- (tmpfd, tmpfname) = tempfile.mkstemp ()
|
|
+
|
|
+ # Create the temporary file in /tmp to ensure that
|
|
+ # cups-pk-helper-mechanism is able to write to it.
|
|
+ (tmpfd, tmpfname) = tempfile.mkstemp (dir="/tmp")
|
|
os.close (tmpfd)
|
|
self._filename = tmpfname
|
|
debugprint ("Created tempfile %s" % tmpfname)
|
|
diff -up system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp system-config-printer-1.2.2/cupspk.py
|
|
--- system-config-printer-1.2.2/cupspk.py.cupspk-fileget-tmp 2010-04-15 00:11:33.000000000 +0100
|
|
+++ system-config-printer-1.2.2/cupspk.py 2010-05-13 13:00:57.760093336 +0100
|
|
@@ -385,7 +385,9 @@ class Connection:
|
|
filename = None
|
|
|
|
if (not use_pycups) and (fd != None or file_object != None):
|
|
- (tmpfd, tmpfname) = tempfile.mkstemp()
|
|
+ # Create the temporary file in /tmp to ensure that
|
|
+ # cups-pk-helper-mechanism is able to write to it.
|
|
+ (tmpfd, tmpfname) = tempfile.mkstemp(dir="/tmp")
|
|
os.close (tmpfd)
|
|
|
|
pk_args = (resource, tmpfname)
|