[X2Go-Commits] [x2goclient] 65/74: formalistic code cleanup using pyflakes
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 15 21:05:52 CET 2023
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.5.0.1
in repository x2goclient.
commit b8c600e2683e2ac41105d32f41b8114597471daf
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon Oct 20 13:08:28 2014 +0200
formalistic code cleanup using pyflakes
---
pyhoca-cli | 5 -----
pyhoca/cli/frontend.py | 8 +++-----
setup.py | 4 +++-
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/pyhoca-cli b/pyhoca-cli
index 7ffecc53..5d4eb168 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -90,12 +90,8 @@ if _X2GOCLIENT_OS in ('Linux', 'Mac'):
import setproctitle
setproctitle.setproctitle("%s %s" % (PROG_NAME, " ".join(PROG_OPTIONS)))
-import time
-import pprint
import argparse
-import getpass
import paramiko
-from types import *
# Python X2Go provides the current local username (OS independent)
from x2go.defaults import CURRENT_LOCAL_USER as current_user
@@ -257,7 +253,6 @@ Possible values for the --pack NX option are:
p_compatopts = p.add_argument_group('compatibility options')
for (p_group, opts) in ((p_x2goopts, x2go_options), (p_printopts, print_options), (p_brokeropts, broker_options), (p_actionopts, action_options), (p_debugopts, debug_options), (p_nxopts, nx_options), (p_backendopts, backend_options), (p_compatopts, compat_options)):
- required = False
for opt in opts:
args = opt['args']
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 6344bb83..da9fa2f4 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -27,15 +27,11 @@ import os
import copy
import time
import getpass
-from types import *
from gevent import socket
# for debugging
import pprint
-# a list of available X2Go print actions
-from x2go.defaults import X2GO_PRINT_ACTIONS
-
# use current_home as user home dir
current_home = os.path.expanduser("~")
@@ -379,6 +375,9 @@ class PyHocaCLI(x2go.X2GoClient):
_session_params = _session_profiles.to_session_params(_profile_id)
print 'Profile ID: %s' % _profile_id
print 'Profile Name: %s' % _session_params['profile_name']
+ print 'Profile Configuration:'
+ pprint.pprint(_profile_config)
+ print 'Derived session parameters:'
pprint.pprint(_session_params)
print
@@ -560,7 +559,6 @@ class PyHocaCLI(x2go.X2GoClient):
try:
session_duration = 0
- mounted = False
while self._X2GoClient__session_ok(self.x2go_session_hash):
time.sleep(2)
diff --git a/setup.py b/setup.py
index 234babb5..c70c3646 100755
--- a/setup.py
+++ b/setup.py
@@ -20,8 +20,10 @@
import os
-from setuptools import setup, find_packages
+from setuptools import setup
+# silence pyflakes, __VERSION__ is properly assigned below...
+__VERSION__ = '0.0.0.0'
for line in file(os.path.join('pyhoca', 'cli', '__init__.py')).readlines():
if (line.startswith('__VERSION__')):
exec(line.strip())
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list