The branch, master has been updated via a8385b05635aee010fa8d9704b928556ff5d52c9 (commit) from 30887eac5d754a14b9baab46d8d42b10f402b612 (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 ----------------------------------------------------------------- commit a8385b05635aee010fa8d9704b928556ff5d52c9 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Feb 23 23:32:50 2012 +0100 Code cleanup: remove all unnecessary imports. Stop defining variables that get never used. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 2 ++ x2go/backends/control/_stdout.py | 17 ++++++++--------- x2go/backends/printing/_file.py | 1 - x2go/backends/printing/_gconf.py | 3 --- x2go/backends/printing/_winreg.py | 3 --- x2go/backends/profiles/_file.py | 2 +- x2go/backends/profiles/_gconf.py | 4 ---- x2go/backends/profiles/_httpsbroker.py | 4 ---- x2go/backends/profiles/_winreg.py | 4 ---- x2go/backends/proxy/_nx3.py | 7 ------- x2go/backends/proxy/base.py | 5 ----- x2go/backends/settings/_file.py | 3 --- x2go/backends/settings/_gconf.py | 3 --- x2go/backends/settings/_winreg.py | 3 --- x2go/backends/terminal/_stdout.py | 6 ------ x2go/cache.py | 1 - x2go/checkhosts.py | 1 - x2go/cleanup.py | 1 - x2go/client.py | 2 -- x2go/defaults.py | 4 ---- x2go/forward.py | 2 +- x2go/guardian.py | 1 - x2go/mimebox.py | 3 --- x2go/mimeboxactions.py | 11 ++--------- x2go/printactions.py | 25 ++++++++++--------------- x2go/printqueue.py | 4 ---- x2go/pulseaudio.py | 2 -- x2go/registry.py | 3 --- x2go/rforward.py | 1 - x2go/session.py | 6 ++---- x2go/sftpserver.py | 5 ++--- x2go/sshproxy.py | 1 - x2go/tests/test_printing.py | 2 -- x2go/utils.py | 2 -- 34 files changed, 28 insertions(+), 116 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index f60caf1..b597198 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,8 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low - Tolerate names containing "-" characters. - Provide hook methods for SSHFS failures (local folder sharing, printing, MIME box). + - Code cleanup: remove all unnecessary imports. Stop defining variables that + get never used. * Depend on python-xlib. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Sat, 28 Sep 2012 01:44:21 +0100 diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py index 05b1c96..0dbe1da 100644 --- a/x2go/backends/control/_stdout.py +++ b/x2go/backends/control/_stdout.py @@ -32,7 +32,6 @@ import paramiko import gevent import copy -import binascii import string import random @@ -906,8 +905,8 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self.logger('suspending associated terminal session: %s' % session_name, loglevel=log.loglevel_DEBUG) (stdin, stdout, stderr) = self._x2go_exec_command("x2gosuspend-session %s" % session_name, loglevel=log.loglevel_DEBUG) - dummy_stdout = stdout.read() - dummy_stderr = stderr.read() + stdout.read() + stderr.read() if self.associated_terminals.has_key(session_name): if self.associated_terminals[session_name] is not None: self.associated_terminals[session_name].__del__() @@ -919,8 +918,8 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self.logger('suspending non-associated terminal session: %s' % session_name, loglevel=log.loglevel_DEBUG) (stdin, stdout, stderr) = self._x2go_exec_command("x2gosuspend-session %s" % session_name, loglevel=log.loglevel_DEBUG) - dummy_stdout = stdout.read() - dummy_stderr = stderr.read() + stdout.read() + stderr.read() _ret = True return _ret @@ -947,8 +946,8 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self.logger('terminating associated session: %s' % session_name, loglevel=log.loglevel_DEBUG) (stdin, stdout, stderr) = self._x2go_exec_command("x2goterminate-session %s" % session_name, loglevel=log.loglevel_DEBUG) - dummy_stdout = stdout.read() - dummy_stderr = stderr.read() + stdout.read() + stderr.read() if self.associated_terminals.has_key(session_name): if self.associated_terminals[session_name] is not None and destroy_terminals: self.associated_terminals[session_name].__del__() @@ -961,8 +960,8 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self.logger('terminating non-associated session: %s' % session_name, loglevel=log.loglevel_DEBUG) (stdin, stdout, stderr) = self._x2go_exec_command("x2goterminate-session %s" % session_name, loglevel=log.loglevel_DEBUG) - dummy_stdout = stdout.read() - dummy_stderr = stderr.read() + stdout.read() + stderr.read() _ret = True return _ret diff --git a/x2go/backends/printing/_file.py b/x2go/backends/printing/_file.py index 2405279..b7446b9 100644 --- a/x2go/backends/printing/_file.py +++ b/x2go/backends/printing/_file.py @@ -29,7 +29,6 @@ __NAME__ = 'x2goprinting-pylib' # modules import types -import ConfigParser # Python X2Go modules import x2go.log as log diff --git a/x2go/backends/printing/_gconf.py b/x2go/backends/printing/_gconf.py index 0dcb0f2..9552e2c 100644 --- a/x2go/backends/printing/_gconf.py +++ b/x2go/backends/printing/_gconf.py @@ -28,12 +28,9 @@ configuration of your X2Go client application. __NAME__ = 'x2goprint-pylib' # modules -import types -import ConfigParser # Python X2Go modules import x2go.log as log -import x2go.printactions as printactions # we hide the default values from epydoc (that's why we transform them to _UNDERSCORE variables) from x2go.defaults import X2GO_CLIENTPRINTING_DEFAULTS as _X2GO_CLIENTPRINTING_DEFAULTS from x2go.defaults import X2GO_PRINTING_CONFIGFILES as _X2GO_PRINTING_CONFIGFILES diff --git a/x2go/backends/printing/_winreg.py b/x2go/backends/printing/_winreg.py index ed9eb84..f120507 100644 --- a/x2go/backends/printing/_winreg.py +++ b/x2go/backends/printing/_winreg.py @@ -28,12 +28,9 @@ configuration of your X2Go client application. __NAME__ = 'x2goprint-pylib' # modules -import types -import ConfigParser # Python X2Go modules import x2go.log as log -import x2go.printactions as printactions # we hide the default values from epydoc (that's why we transform them to _UNDERSCORE variables) from x2go.defaults import X2GO_CLIENTPRINTING_DEFAULTS as _X2GO_CLIENTPRINTING_DEFAULTS from x2go.defaults import X2GO_PRINTING_CONFIGFILES as _X2GO_PRINTING_CONFIGFILES diff --git a/x2go/backends/profiles/_file.py b/x2go/backends/profiles/_file.py index 3a40544..64688df 100644 --- a/x2go/backends/profiles/_file.py +++ b/x2go/backends/profiles/_file.py @@ -147,7 +147,7 @@ class X2goSessionProfilesFILE(inifiles.X2goIniFile): def has_profile(self, profile_id_or_name): try: - _profile_id = self.check_profile_id_or_name(profile_id_or_name) + self.check_profile_id_or_name(profile_id_or_name) return True except X2goProfileException: return False diff --git a/x2go/backends/profiles/_gconf.py b/x2go/backends/profiles/_gconf.py index df71401..f8e6eec 100644 --- a/x2go/backends/profiles/_gconf.py +++ b/x2go/backends/profiles/_gconf.py @@ -26,16 +26,12 @@ applications. """ __NAME__ = 'x2gosessionprofiles-pylib' -import copy - # Python X2Go modules from x2go.defaults import X2GO_SESSIONPROFILES_CONFIGFILES from x2go.defaults import X2GO_SESSIONPROFILE_DEFAULTS import x2go.inifiles as inifiles import x2go.log as log -import x2go.utils as hostname -from x2go.x2go_exceptions import X2goProfileException from x2go.x2go_exceptions import X2goNotImplementedYetException class X2goSessionProfilesGCONF(inifiles.X2goIniFile): diff --git a/x2go/backends/profiles/_httpsbroker.py b/x2go/backends/profiles/_httpsbroker.py index 131ee9a..26d57c4 100644 --- a/x2go/backends/profiles/_httpsbroker.py +++ b/x2go/backends/profiles/_httpsbroker.py @@ -26,16 +26,12 @@ applications. """ __NAME__ = 'x2gosessionprofiles-pylib' -import copy - # Python X2Go modules from x2go.defaults import X2GO_SESSIONPROFILES_CONFIGFILES from x2go.defaults import X2GO_SESSIONPROFILE_DEFAULTS import x2go.inifiles as inifiles import x2go.log as log -import x2go.utils as utils -from x2go.x2go_exceptions import X2goProfileException from x2go.x2go_exceptions import X2goNotImplementedYetException class X2goSessionProfilesHTTPSBROKER(inifiles.X2goIniFile): diff --git a/x2go/backends/profiles/_winreg.py b/x2go/backends/profiles/_winreg.py index 4440718..9b054d9 100644 --- a/x2go/backends/profiles/_winreg.py +++ b/x2go/backends/profiles/_winreg.py @@ -26,16 +26,12 @@ applications. """ __NAME__ = 'x2gosessionprofiles-pylib' -import copy - # Python X2Go modules from x2go.defaults import X2GO_SESSIONPROFILES_CONFIGFILES from x2go.defaults import X2GO_SESSIONPROFILE_DEFAULTS import x2go.inifiles as inifiles import x2go.log as log -import x2go.utils as hostname -from x2go.x2go_exceptions import X2goProfileException from x2go.x2go_exceptions import X2goNotImplementedYetException class X2goSessionProfilesWINREG(inifiles.X2goIniFile): diff --git a/x2go/backends/proxy/_nx3.py b/x2go/backends/proxy/_nx3.py index bd2d42f..f508816 100644 --- a/x2go/backends/proxy/_nx3.py +++ b/x2go/backends/proxy/_nx3.py @@ -24,16 +24,9 @@ X2goProxy classes - proxying your connection through NX3 and others. __NAME__ = 'x2goproxynx3-pylib' # modules -import gevent import os -import sys -import types -import time -import copy -import threading # Python X2Go modules -import x2go.forward as forward import x2go.utils as utils import x2go.log as log import base diff --git a/x2go/backends/proxy/base.py b/x2go/backends/proxy/base.py index fca9720..39cc45a 100644 --- a/x2go/backends/proxy/base.py +++ b/x2go/backends/proxy/base.py @@ -26,18 +26,13 @@ __NAME__ = 'x2goproxy-pylib' # modules import gevent import os -import sys -import types -import time import copy import threading -import cStringIO # Python X2Go modules import x2go.forward as forward import x2go.log as log import x2go.utils as utils -import x2go.x2go_exceptions as x2go_exceptions from x2go.defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS if _X2GOCLIENT_OS in ("Windows"): diff --git a/x2go/backends/settings/_file.py b/x2go/backends/settings/_file.py index c35d9af..b3dd81f 100644 --- a/x2go/backends/settings/_file.py +++ b/x2go/backends/settings/_file.py @@ -28,9 +28,6 @@ in your Python X2Go based applications to access the """ __NAME__ = 'x2gosettings-pylib' -# modules -import os - # Python X2Go modules import x2go.log as log from x2go.defaults import X2GO_SETTINGS_CONFIGFILES as _X2GO_SETTINGS_CONFIGFILES diff --git a/x2go/backends/settings/_gconf.py b/x2go/backends/settings/_gconf.py index 38ad5fe..5b4ad37 100644 --- a/x2go/backends/settings/_gconf.py +++ b/x2go/backends/settings/_gconf.py @@ -28,9 +28,6 @@ in your Python X2Go based applications to access the """ __NAME__ = 'x2gosettings-pylib' -# modules -import os - # Python X2Go modules import x2go.log as log from x2go.defaults import X2GO_SETTINGS_CONFIGFILES as _X2GO_SETTINGS_CONFIGFILES diff --git a/x2go/backends/settings/_winreg.py b/x2go/backends/settings/_winreg.py index 707aca0..6a7acac 100644 --- a/x2go/backends/settings/_winreg.py +++ b/x2go/backends/settings/_winreg.py @@ -28,9 +28,6 @@ in your Python X2Go based applications to access the """ __NAME__ = 'x2gosettings-pylib' -# modules -import os - # Python X2Go modules import x2go.log as log from x2go.defaults import X2GO_SETTINGS_CONFIGFILES as _X2GO_SETTINGS_CONFIGFILES diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py index cb190ed..a2a5157 100644 --- a/x2go/backends/terminal/_stdout.py +++ b/x2go/backends/terminal/_stdout.py @@ -28,11 +28,8 @@ __NAME__ = 'x2goterminalsession-pylib' # modules import os -import sys import types import gevent -import threading -import signal import cStringIO import copy import shutil @@ -48,8 +45,6 @@ import x2go.defaults as defaults import x2go.utils as utils import x2go.x2go_exceptions as x2go_exceptions -from x2go.cleanup import x2go_cleanup - # we hide the default values from epydoc (that's why we transform them to _UNDERSCORE variables) from x2go.defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS from x2go.defaults import X_DISPLAY as _X_DISPLAY @@ -481,7 +476,6 @@ class X2goTerminalSessionSTDOUT(object): def _x2go_pause_rev_fw_tunnel(self, name): # pause reverse SSH tunnel of name <name> - ssh_transport = self.get_transport() _tunnel = self.reverse_tunnels[self.session_info.name][name][1] if _tunnel is not None: _tunnel.pause() diff --git a/x2go/cache.py b/x2go/cache.py index 87d2bac..b447b7c 100644 --- a/x2go/cache.py +++ b/x2go/cache.py @@ -25,7 +25,6 @@ __NAME__ = 'x2gocache-pylib' # modules import copy -import gevent # Python X2Go modules import log diff --git a/x2go/checkhosts.py b/x2go/checkhosts.py index a94ce78..8682574 100644 --- a/x2go/checkhosts.py +++ b/x2go/checkhosts.py @@ -26,7 +26,6 @@ __NAME__ = 'x2gocheckhosts-pylib' # modules import paramiko import binascii -import uuid # Python X2Go modules import sshproxy diff --git a/x2go/cleanup.py b/x2go/cleanup.py index 760a242..82d49d1 100644 --- a/x2go/cleanup.py +++ b/x2go/cleanup.py @@ -27,7 +27,6 @@ import paramiko import threading # Python X2Go modules -import guardian import rforward from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS diff --git a/x2go/client.py b/x2go/client.py index 85481fb..4adfb01 100644 --- a/x2go/client.py +++ b/x2go/client.py @@ -117,12 +117,10 @@ Session Suspending/Terminating __NAME__ = 'x2goclient-pylib' #modules -import uuid import copy import sys import types import os -import gevent # Python X2Go modules from registry import X2goSessionRegistry diff --git a/x2go/defaults.py b/x2go/defaults.py index 8be690f..65868f2 100644 --- a/x2go/defaults.py +++ b/x2go/defaults.py @@ -23,14 +23,10 @@ Default variables and values for Python X2Go. """ __NAME__ = 'x2godefaults-pylib' -import sys import os import paramiko import platform -## X2Go imports -import utils - ## ## Common X2Go defaults ## diff --git a/x2go/forward.py b/x2go/forward.py index b5616fe..69f3af1 100644 --- a/x2go/forward.py +++ b/x2go/forward.py @@ -25,7 +25,7 @@ proxying of graphical X2Go elements. __NAME__ = "x2gofwtunnel-pylib" # modules -import os, sys, copy +import copy # gevent/greenlet import gevent diff --git a/x2go/guardian.py b/x2go/guardian.py index 8d20dba..5b8ea01 100644 --- a/x2go/guardian.py +++ b/x2go/guardian.py @@ -32,7 +32,6 @@ import copy # Python X2Go modules from cleanup import x2go_cleanup -import x2go_exceptions import log _sigterm_received = False diff --git a/x2go/mimebox.py b/x2go/mimebox.py index bc9dfa3..71c1e9f 100644 --- a/x2go/mimebox.py +++ b/x2go/mimebox.py @@ -42,9 +42,6 @@ import utils import log import mimeboxactions -if defaults.X2GOCLIENT_OS != 'Windows': - from x2go_exceptions import WindowsError - class X2goMIMEboxQueue(threading.Thread): """\ diff --git a/x2go/mimeboxactions.py b/x2go/mimeboxactions.py index 2e1d881..4dec16d 100644 --- a/x2go/mimeboxactions.py +++ b/x2go/mimeboxactions.py @@ -27,11 +27,7 @@ __NAME__ = 'x2gomimeboxactions-pylib' # modules import os -import sys -import shutil import copy -import types -import threading import time from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS @@ -44,9 +40,6 @@ else: # Python X2Go modules import log -import defaults -# we hide the default values from epydoc (that's why we transform them to _UNDERSCORE variables) -import utils import x2go_exceptions _MIMEBOX_ENV = os.environ.copy() @@ -163,7 +156,7 @@ class X2goMIMEboxActionOPEN(X2goMIMEboxAction): else: cmd_line = [ 'xdg-open', os.path.join(mimebox_dir, mimebox_file), ] self.logger('opening MIME box file with command: %s' % ' '.join(cmd_line), loglevel=log.loglevel_DEBUG) - p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_MIMEBOX_ENV) + subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_MIMEBOX_ENV) time.sleep(20) @@ -216,7 +209,7 @@ class X2goMIMEboxActionOPENWITH(X2goMIMEboxAction): self.logger('the evocation of the Open-with dialog box is currently not available on Linux, falling back to MIME box action OPEN', loglevel=log.loglevel_WARN) cmd_line = [ 'xdg-open', os.path.join(mimebox_dir, mimebox_file), ] self.logger('opening MIME box file with command: %s' % ' '.join(cmd_line), loglevel=log.loglevel_DEBUG) - p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_MIMEBOX_ENV) + subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_MIMEBOX_ENV) time.sleep(20) diff --git a/x2go/printactions.py b/x2go/printactions.py index c57b700..f62e804 100644 --- a/x2go/printactions.py +++ b/x2go/printactions.py @@ -30,14 +30,9 @@ __NAME__ = 'x2goprintactions-pylib' # modules import os -import sys import shutil 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"): @@ -205,11 +200,11 @@ class X2goPrintActionPDFVIEW(X2goPrintAction): cmd_line = [ self.pdfview_cmd, _hr_filename, ] self.logger('viewing incoming PDF with command: %s' % ' '.join(cmd_line), loglevel=log.loglevel_DEBUG) try: - p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV) + subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV) except OSError, e: if e.errno == 2: cmd_line = [ defaults.DEFAULT_PDFVIEW_CMD, _hr_filename ] - p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV) + subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV) else: raise(e) self.logger('waiting 20s longer before deleting the PDF file ,,%s\'\'' % _hr_filename, loglevel=log.loglevel_DEBUG) @@ -329,12 +324,12 @@ class X2goPrintActionPRINT(X2goPrintAction): _gsprint_bin = os.path.normpath(os.path.join(_program_files, 'ghostgum', 'gsview', 'gsprint.exe',)) self.logger('Using hard-coded gsprint.exe path: %s' % _gsprint_bin, loglevel=log.loglevel_DEBUG) self.logger('Trying Ghostgum tool ,,gsprint.exe'' for printing first (full path: %s)' % _gsprint_bin, loglevel=log.loglevel_DEBUG) - p = subprocess.Popen([_gsprint_bin, pdf_file, ], - stdin=_stdin, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - shell=_shell, - ) + subprocess.Popen([_gsprint_bin, pdf_file, ], + stdin=_stdin, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + shell=_shell, + ) # give gsprint.exe a little time to find our printer time.sleep(10) @@ -385,7 +380,7 @@ class X2goPrintActionPRINT(X2goPrintAction): '%s' % _hr_filename, ] 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) + 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) @@ -443,7 +438,7 @@ class X2goPrintActionPRINTCMD(X2goPrintAction): cmd_line = self.print_cmd.split() cmd_line.append(_hr_filename) self.logger('executing external command: %s' % " ".join(cmd_line), loglevel=log.loglevel_DEBUG) - p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=_PRINT_ENV) + 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) diff --git a/x2go/printqueue.py b/x2go/printqueue.py index 8eeaef6..f5b99c6 100644 --- a/x2go/printqueue.py +++ b/x2go/printqueue.py @@ -37,14 +37,10 @@ import gevent import defaults import utils import log -import printactions # we hide the default values from epydoc (that's why we transform them to _UNDERSCORE variables) from backends.printing import X2goClientPrinting as _X2goClientPrinting -if defaults.X2GOCLIENT_OS != 'Windows': - from x2go_exceptions import WindowsError - from defaults import X2GO_PRINTING_FILENAME as _X2GO_PRINTING_FILENAME diff --git a/x2go/pulseaudio.py b/x2go/pulseaudio.py index 10ca1ef..d3fdb33 100644 --- a/x2go/pulseaudio.py +++ b/x2go/pulseaudio.py @@ -29,14 +29,12 @@ __NAME__ = 'x2gopulseaudio-pylib' from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS if _X2GOCLIENT_OS == 'Windows': - import wmi import win32process import win32con import win32event # modules import os -import subprocess import threading import gevent import copy diff --git a/x2go/registry.py b/x2go/registry.py index 4ab3d00..4fe08a0 100644 --- a/x2go/registry.py +++ b/x2go/registry.py @@ -26,13 +26,10 @@ __NAME__ = 'x2gosessregistry-pylib' import os import copy import types -import uuid import time -import threading # Python X2Go modules import log -import utils import session import x2go_exceptions diff --git a/x2go/rforward.py b/x2go/rforward.py index 1fa81e4..d41b9c6 100644 --- a/x2go/rforward.py +++ b/x2go/rforward.py @@ -33,7 +33,6 @@ import paramiko # gevent/greenlet from gevent import select, socket, Timeout -from gevent import sleep as gevent_sleep # Python X2Go modules import log diff --git a/x2go/session.py b/x2go/session.py index c4b71b5..8c12410 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -33,7 +33,6 @@ import copy import types import uuid import time -import threading import gevent # Python X2Go modules @@ -47,7 +46,6 @@ from x2go.backends.terminal import X2goTerminalSession as _X2goTerminalSession from x2go.backends.info import X2goServerSessionInfo as _X2goServerSessionInfo from x2go.backends.info import X2goServerSessionList as _X2goServerSessionList from x2go.backends.proxy import X2goProxy as _X2goProxy -from x2go.backends.profiles import X2goSessionProfiles as _X2goSessionProfiles from x2go.backends.settings import X2goClientSettings as _X2goClientSettings from x2go.backends.printing import X2goClientPrinting as _X2goClientPrinting @@ -907,7 +905,7 @@ class X2goSession(object): # then tidy up... self.disconnect() - _dummy = self.get_server_hostname() + self.get_server_hostname() if self.connected: self.update_status() @@ -1302,7 +1300,7 @@ class X2goSession(object): raise x2go_exceptions.X2goDesktopSharingException('No such desktop ID: %s' % _orig_desktop) _session_owner = _desktop.split('@')[0] - _display = _desktop.split('@')[1] + #_display = _desktop.split('@')[1] if self.is_alive(): if self.get_username() != _session_owner: diff --git a/x2go/sftpserver.py b/x2go/sftpserver.py index e10e79b..730acc6 100644 --- a/x2go/sftpserver.py +++ b/x2go/sftpserver.py @@ -31,9 +31,9 @@ for further information see his website: http://www.richardmurri.com """ __NAME__ = "x2gosftpserver-pylib" -import base64, os, sys +import os import shutil -import copy, types +import copy import threading import paramiko import gevent @@ -41,7 +41,6 @@ import gevent # Python X2Go modules import rforward import defaults -import utils import log class _SSHServer(paramiko.ServerInterface): diff --git a/x2go/sshproxy.py b/x2go/sshproxy.py index f37cb29..a4d14ed 100644 --- a/x2go/sshproxy.py +++ b/x2go/sshproxy.py @@ -29,7 +29,6 @@ import os import copy import paramiko import threading -import socket import string import random diff --git a/x2go/tests/test_printing.py b/x2go/tests/test_printing.py index efb13af..77dba3b 100644 --- a/x2go/tests/test_printing.py +++ b/x2go/tests/test_printing.py @@ -17,10 +17,8 @@ # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -import sys import unittest import tempfile -import time # Python X2Go modules import x2go diff --git a/x2go/utils.py b/x2go/utils.py index 87c053d..87c4a4f 100644 --- a/x2go/utils.py +++ b/x2go/utils.py @@ -29,11 +29,9 @@ import locale import re import types import copy -import paramiko import socket import gevent import string -import re import subprocess import Xlib 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).