1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-11 05:17:55 +03:00

Removing qt imports from plugin scripts

This commit is contained in:
Adolfo Gómez García 2017-01-20 06:54:27 +01:00
parent 83ed44b399
commit d42482b6c3
17 changed files with 6 additions and 42 deletions

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module
from PyQt4 import QtCore, QtGui # @UnusedImport
import subprocess
from uds import tools # @UnresolvedImport

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, undefined-variable
from PyQt4 import QtCore, QtGui # @UnusedImport
import subprocess
from uds.forward import forward # @UnresolvedImport

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable, invalid-sequence-index
from PyQt4 import QtCore, QtGui # @UnusedImport
import subprocess
import os

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable, invalid-sequence-index
from PyQt4 import QtCore, QtGui # @UnusedImport
import subprocess
from uds.forward import forward # @UnresolvedImport
import os

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module
from PyQt4 import QtCore, QtGui # @UnusedImport
import _winreg
import subprocess

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, undefined-variable
from PyQt4 import QtCore, QtGui # @UnusedImport
import _winreg
import subprocess
from uds.forward import forward # @UnresolvedImport

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable, invalid-sequence-index
from PyQt4 import QtCore, QtGui
import subprocess
import re
@ -50,7 +49,6 @@ if xfreerdp is not None:
fnc, app = execNewXFreeRdp, xfreerdp
except Exception as e: # Valid version not found, pass to check rdesktop
# QtGui.QMessageBox.critical(parent, 'Notice', six.text_type(e), QtGui.QMessageBox.Ok) # @UndefinedVariable
pass
if app is None or fnc is None:

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable, invalid-sequence-index
from PyQt4 import QtCore, QtGui
import subprocess
import re
from uds.forward import forward # @UnresolvedImport
@ -51,7 +50,6 @@ if xfreerdp is not None:
fnc, app = execNewXFreeRdp, xfreerdp
except Exception as e: # Valid version not found, pass to check rdesktop
# QtGui.QMessageBox.critical(parent, 'Notice', six.text_type(e), QtGui.QMessageBox.Ok) # @UndefinedVariable
pass
if app is None or fnc is None:

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable, invalid-sequence-index
from PyQt4 import QtCore, QtGui
import subprocess
import os
import urllib
@ -41,8 +40,7 @@ def onExit():
)
if executable is None:
QtGui.QMessageBox.critical(parent, 'Notice', # @UndefinedVariable
'''<p><b>Microsoft Remote Desktop Connection not found</b></p>
raise Exception('''<p><b>Microsoft Remote Desktop Connection not found</b></p>
<p>In order to connect to UDS RDP Sessions, you need to have at least one of the following:<p>
<ul>
<li>
@ -55,9 +53,7 @@ if executable is None:
<p>You can get it from <a href="{m.this_server}static/other/CoRD.pkg">this link</a></p>
</li>
</ul>
<p>If both apps are installed, Remote Desktop Connection will be used as first option</p>
''', QtGui.QMessageBox.Ok)
<p>If both apps are installed, Remote Desktop Connection will be used as first option</p>''')
elif executable == msrdc:
try:
if {m.hasCredentials}: # @UndefinedVariable
@ -78,7 +74,7 @@ elif executable == msrdc:
tools.addFileToUnlink(filename)
except Exception as e:
QtGui.QMessageBox.critical(parent, 'Notice', six.text_type(e), QtGui.QMessageBox.Ok) # @UndefinedVariable
raise
else: # CoRD
url = 'rdp://'

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable, invalid-sequence-index
from PyQt4 import QtCore, QtGui
import subprocess
import os
import urllib
@ -37,8 +36,7 @@ def onExit():
)
if executable is None:
QtGui.QMessageBox.critical(parent, 'Notice', # @UndefinedVariable
'''<p><b>Microsoft Remote Desktop Connection not found</b></p>
raise Exception('''<p><b>Microsoft Remote Desktop Connection not found</b></p>
<p>In order to connect to UDS RDP Sessions, you need to have at least one of the following:<p>
<ul>
<li>
@ -52,8 +50,7 @@ if executable is None:
</li>
</ul>
<p>If both apps are installed, Remote Desktop Connection will be used as first option</p>
''', QtGui.QMessageBox.Ok)
''')
forwardThread, port = forward('{m.tunHost}', '{m.tunPort}', '{m.tunUser}', '{m.tunPass}', '{m.ip}', 3389)
@ -88,7 +85,7 @@ else:
tools.addFileToUnlink(filename)
except Exception as e:
QtGui.QMessageBox.critical(parent, 'Notice', six.text_type(e), QtGui.QMessageBox.Ok) # @UndefinedVariable
raise
else: # CoRD
url = 'rdp://'
username, domain = '{m.username}', '{m.domain}'

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module
from PyQt4 import QtCore, QtGui
import win32crypt # @UnresolvedImport
import os
import subprocess
@ -19,5 +18,3 @@ filename = tools.saveTempFile(theFile)
executable = tools.findApp('mstsc.exe')
subprocess.Popen([executable, filename])
tools.addFileToUnlink(filename)
# QtGui.QMessageBox.critical(parent, 'Notice', filename + ", " + executable, QtGui.QMessageBox.Ok)

View File

@ -4,7 +4,6 @@ from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable
from PyQt4 import QtCore, QtGui
import win32crypt # @UnresolvedImport
import os
import subprocess
@ -34,5 +33,3 @@ if executable is None:
subprocess.Popen([executable, filename])
tools.addFileToUnlink(filename)
# QtGui.QMessageBox.critical(parent, 'Notice', filename + ", " + executable, QtGui.QMessageBox.Ok)

View File

@ -21,5 +21,3 @@ theFile = '''{m.r.as_file}'''
filename = tools.saveTempFile(theFile)
subprocess.Popen([executable, filename])
# QtGui.QMessageBox.critical(parent, 'Notice', filename + ", " + executable, QtGui.QMessageBox.Ok)

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module
from PyQt4 import QtCore, QtGui # @UnresolvedImport
import os
import subprocess
@ -25,5 +24,3 @@ if executable is None:
subprocess.Popen([executable, '--session-conf={{}}'.format(filename), '--session=UDS/connect', '--close-disconnect', '--hide', '--no-menu', '--add-to-known-hosts'])
# tools.addFileToUnlink(filename)
# tools.addFileToUnlink(keyFile)
# QtGui.QMessageBox.critical(parent, 'Notice', executable + ' -- ' + keyFile + ', ' + filename, QtGui.QMessageBox.Ok) # @UndefinedVariable

View File

@ -4,7 +4,6 @@ from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable
from PyQt4 import QtCore, QtGui # @UnresolvedImport
import os
import subprocess
from uds.forward import forward # @UnresolvedImport
@ -33,4 +32,3 @@ if executable is None:
subprocess.Popen([executable, '--session-conf={{}}'.format(filename), '--session=UDS/connect', '--close-disconnect', '--hide', '--no-menu', '--add-to-known-hosts'])
# QtGui.QMessageBox.critical(parent, 'Notice', filename + ", " + executable, QtGui.QMessageBox.Ok)

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module
from PyQt4 import QtCore, QtGui # @UnresolvedImport
import os
import subprocess
@ -26,5 +25,3 @@ if executable is None:
subprocess.Popen([executable, '--session-conf={{}}'.format(filename), '--session=UDS/connect', '--close-disconnect', '--hide', '--no-menu', '--add-to-known-hosts'])
# tools.addFileToUnlink(filename)
# tools.addFileToUnlink(keyFile)
# QtGui.QMessageBox.critical(parent, 'Notice', executable + ' -- ' + keyFile + ', ' + filename, QtGui.QMessageBox.Ok) # @UndefinedVariable

View File

@ -4,7 +4,6 @@ from __future__ import unicode_literals
# pylint: disable=import-error, no-name-in-module, too-many-format-args, undefined-variable
from PyQt4 import QtCore, QtGui # @UnresolvedImport
import os
import subprocess
from uds.forward import forward # @UnresolvedImport
@ -31,5 +30,3 @@ if executable is None:
<p>You can download it for windows from <a href="http://wiki.x2go.org/doku.php">X2Go Site</a>.</p>''')
subprocess.Popen([executable, '--session-conf={{}}'.format(filename), '--session=UDS/connect', '--close-disconnect', '--hide', '--no-menu', '--add-to-known-hosts'])
# QtGui.QMessageBox.critical(parent, 'Notice', filename + ", " + executable, QtGui.QMessageBox.Ok)