[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: af69549053bc2d447ecdd415ec3bb7bcf7e75e68
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:27:40 CET 2014
The branch, build-baikal has been updated
via af69549053bc2d447ecdd415ec3bb7bcf7e75e68 (commit)
from 9950236dd6e2246d6e5fb51dd77a0fe339e8cdbb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2go/printactions.py | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
The diff of changes is:
diff --git a/x2go/printactions.py b/x2go/printactions.py
index b273ba6..6de16b7 100644
--- a/x2go/printactions.py
+++ b/x2go/printactions.py
@@ -168,7 +168,7 @@ class X2goPrintActionPDFVIEW(X2goPrintAction):
"""
if _X2GOCLIENT_OS == "Windows":
- self.logger('printing incoming job with Python\'s os.startfile(): %s' % pdf_file, loglevel=log.loglevel_DEBUG)
+ self.logger('viewing incoming job in PDF viewer with Python\'s os.startfile( command): %s' % pdf_file, loglevel=log.loglevel_DEBUG)
try:
os.startfile(pdf_file)
except WindowsError, win_err:
@@ -185,10 +185,9 @@ class X2goPrintActionPDFVIEW(X2goPrintAction):
_hr_filename = self._humanreadable_filename(pdf_file, job_title, spool_dir, )
shutil.copy2(pdf_file, _hr_filename)
cmd_line = [ self.pdfview_cmd, _hr_filename, ]
- self.logger('printing incoming job with command: %s' % ' '.join(cmd_line), loglevel=log.loglevel_DEBUG)
+ self.logger('viewing incoming PDF with command: %s' % ' '.join(cmd_line), loglevel=log.loglevel_DEBUG)
p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV)
- # this is nasty!!!!
- self.logger('giving PDF viewer 20s to get the PDF file %s loaded' % _hr_filename, loglevel=log.loglevel_DEBUG)
+ self.logger('waiting 20s longer before deleting the PDF file ,,%s\'\'' % _hr_filename, loglevel=log.loglevel_DEBUG)
time.sleep(20)
os.remove(_hr_filename)
@@ -235,9 +234,12 @@ class X2goPrintActionPDFSAVE(X2goPrintAction):
"""
dest_file = self._humanreadable_filename(pdf_file, job_title, target_path=self.save_to_folder)
shutil.copy2(pdf_file, dest_file)
+
# this is nasty!!!!
- self.logger('copying incomig PDF file %s to %s' % (pdf_file, dest_file) , loglevel=log.loglevel_DEBUG)
+ self.logger('waiting 20s longer before deleting the PDF file ,,%s\'\'' % _hr_filename, loglevel=log.loglevel_DEBUG)
time.sleep(20)
+ try: os.remove(_hr_filename)
+ except OSError: pass
class X2goPrintActionPRINT(X2goPrintAction):
@@ -310,8 +312,11 @@ class X2goPrintActionPRINT(X2goPrintAction):
self.logger('executing local print command: %s' % " ".join(cmd_line), loglevel=log.loglevel_DEBUG)
p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV)
- # this is nasty!!!!
- time.sleep(20)
+ # this is nasty!!!!
+ self.logger('waiting 20s longer before deleting the PDF file ,,%s\'\'' % _hr_filename, loglevel=log.loglevel_DEBUG)
+ time.sleep(20)
+ try: os.remove(_hr_filename)
+ except OSError: pass
class X2goPrintActionPRINTCMD(X2goPrintAction):
@@ -365,7 +370,10 @@ class X2goPrintActionPRINTCMD(X2goPrintAction):
p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV)
# this is nasty!!!!
+ self.logger('waiting 20s longer before deleting the PDF file ,,%s\'\'' % _hr_filename, loglevel=log.loglevel_DEBUG)
time.sleep(20)
+ try: os.remove(_hr_filename)
+ except OSError: pass
class X2goPrintActionDIALOG(X2goPrintAction):
@@ -417,7 +425,9 @@ class X2goPrintActionDIALOG(X2goPrintAction):
self.client_instance.HOOK_open_print_dialog(_hr_filename,profile_name=self.profile_name, session_name=self.session_name)
# this is nasty!!!!
+ self.logger('waiting 20s longer before deleting the PDF file ,,%s\'\'' % _hr_filename, loglevel=log.loglevel_DEBUG)
time.sleep(20)
- os.remove(_hr_filename)
+ try: os.remove(_hr_filename)
+ except OSError: pass
hooks/post-receive
--
python-x2go.git (Python X2Go Client API)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).
More information about the x2go-commits
mailing list