The branch, build-baikal has been updated via 92ff5a7d7d612fcb7b7599ee0dc20367191493ef (commit) from efd458ba0529b5860201933488db9285f38e6099 (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/defaults.py | 2 +- x2go/printactions.py | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) The diff of changes is: diff --git a/x2go/defaults.py b/x2go/defaults.py index 190f5b2..ad972d5 100644 --- a/x2go/defaults.py +++ b/x2go/defaults.py @@ -358,7 +358,7 @@ X2GO_PRINT_ACTIONS = { DEFAULT_PDFVIEW_CMD = 'xdg-open' """Default PDF viewer command for Linux systems (PDFVIEW print action).""" -DEFAULT_PDFSAVE_LOCATION = '~/PDF' +DEFAULT_PDFSAVE_LOCATION = 'PDF' """Default location for saving PDF files (PDFSAVE print action).""" DEFAULT_PRINTCMD_CMD = 'lpr' """Default command for the PRINTCMD print action.""" diff --git a/x2go/printactions.py b/x2go/printactions.py index dfaa0a6..ff3071d 100644 --- a/x2go/printactions.py +++ b/x2go/printactions.py @@ -36,6 +36,8 @@ import copy import types import threading import time +import re +import string from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS if _X2GOCLIENT_OS in ("Windows"): @@ -230,11 +232,18 @@ class X2goPrintActionPDFSAVE(X2goPrintAction): """ if save_to_folder is None: - save_to_folder = os.path.expanduser(defaults.DEFAULT_PDFSAVE_LOCATION) + save_to_folder = defaults.DEFAULT_PDFSAVE_LOCATION + if not (save_to_folder.startswith('/') or re.match('^[%s]\:\\\\' % string.ascii_letters, save_to_folder)): + if not save_to_folder.startswith('~'): + save_to_folder = os.path.normpath('~/%s' % save_to_folder) + save_to_folder = os.path.expanduser(save_to_folder) self.save_to_folder = save_to_folder + + X2goPrintAction.__init__(self, client_instance=client_instance, logger=None, loglevel=loglevel) + + self.logger('Save location for incoming PDFs is: %s' % self.save_to_folder, loglevel=log.loglevel_DEBUG) if not os.path.exists(self.save_to_folder): os.makedirs(self.save_to_folder, mode=0755) - X2goPrintAction.__init__(self, client_instance=client_instance, logger=None, loglevel=loglevel) def do_print(self, pdf_file, job_title, spool_dir): """\ 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).