[X2Go-Commits] python-x2go.git - twofactorauth (branch) updated: 219a8e705e34b0629102273814e5614ee4005378

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:55:45 CEST 2013


The branch, twofactorauth has been updated
       via  219a8e705e34b0629102273814e5614ee4005378 (commit)
      from  db512a5b8b26157dd37963df88b3ae72a173d1ae (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 |   19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

The diff of changes is:
diff --git a/x2go/printactions.py b/x2go/printactions.py
index 877b5aa..a9034c3 100644
--- a/x2go/printactions.py
+++ b/x2go/printactions.py
@@ -78,6 +78,7 @@ class X2goPrintAction(object):
             self.logger = copy.deepcopy(logger)
         self.logger.tag = __NAME__
 
+        # these get set from within the X2goPrintQueue class
         self.profile_name = 'UNKNOWN'
         self.session_name = 'UNKNOWN'
 
@@ -166,22 +167,22 @@ class X2goPrintActionPDFVIEW(X2goPrintAction):
         @type spool_dir: C{str}
 
         """
-        _hr_filename = self._humanreadable_filename(pdf_file, job_title, spool_dir, )
-        shutil.copy2(pdf_file, _hr_filename)
-        if sys.platform == "win32":
+        if _X2GOCLIENT_OS == "Windows":
             self.logger('printing incoming job with Python\'s os.startfile(): %s' % pdf_file, loglevel=log.loglevel_DEBUG)
             try:
-                os.startfile(_hr_filename)
+                os.startfile(pdf_file)
             except WindowsError, win_err:
                 if self.client_instance:
-                    self.HOOK_printaction_error(_hr_filename,
-                                                profile_name=self.profile_name,
-                                                session_name=self.session_name,
-                                                err_msg=str(win_err)
-                                               )
+                    self.client_instance.HOOK_printaction_error(pdf_file,
+                                                                profile_name=self.profile_name,
+                                                                session_name=self.session_name,
+                                                                err_msg=str(win_err)
+                                                               )        
                 else:
                     self.logger('Encountered WindowsError: %s' % str(win_err), loglevel=log.loglevel_ERROR)
         else:
+            _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)
             p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV)


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