Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7a77678d
authored
Feb 21, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
laborgui: Fixed error message
parent
2bd43c4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
miscellaneous/laborclient/cloudgui/rdp.py
+7
-13
miscellaneous/laborclient/setup.py
+1
-1
No files found.
miscellaneous/laborclient/cloudgui/rdp.py
View file @
7a77678d
...
@@ -27,6 +27,7 @@ class RDP:
...
@@ -27,6 +27,7 @@ class RDP:
# window.set_title("Message dialogs")
# window.set_title("Message dialogs")
md
=
gtk
.
MessageDialog
(
parent
=
None
,
type
=
gtk
.
MESSAGE_INFO
,
buttons
=
gtk
.
BUTTONS_CLOSE
,
message_format
=
text
)
md
=
gtk
.
MessageDialog
(
parent
=
None
,
type
=
gtk
.
MESSAGE_INFO
,
buttons
=
gtk
.
BUTTONS_CLOSE
,
message_format
=
text
)
md
.
run
()
md
.
run
()
print
"After run"
md
.
destroy
()
md
.
destroy
()
def
connect
(
self
):
def
connect
(
self
):
...
@@ -45,6 +46,7 @@ class RDP:
...
@@ -45,6 +46,7 @@ class RDP:
#p.terminate()
#p.terminate()
if
self
.
global_vars
.
pid
>
0
:
if
self
.
global_vars
.
pid
>
0
:
os
.
kill
(
self
.
global_vars
.
pid
,
signal
.
SIGKILL
)
os
.
kill
(
self
.
global_vars
.
pid
,
signal
.
SIGKILL
)
#print "Join"
p
.
join
()
p
.
join
()
elif
self
.
scheme
==
"nx"
:
elif
self
.
scheme
==
"nx"
:
self
.
connect_nx
()
self
.
connect_nx
()
...
@@ -72,19 +74,11 @@ class RDP:
...
@@ -72,19 +74,11 @@ class RDP:
def
connect_rdp
(
self
,
global_vars
):
def
connect_rdp
(
self
,
global_vars
):
rdp_command
=
[
"rdesktop"
,
"-khu"
,
"-E"
,
"-P"
,
"-0"
,
"-f"
,
"-u"
,
self
.
username
,
"-p"
,
self
.
password
,
self
.
host
+
":"
+
self
.
port
]
rdp_command
=
[
"rdesktop"
,
"-khu"
,
"-E"
,
"-P"
,
"-0"
,
"-f"
,
"-u"
,
self
.
username
,
"-p"
,
self
.
password
,
self
.
host
+
":"
+
self
.
port
]
try
:
proc
=
subprocess
.
Popen
(
rdp_command
,
stdout
=
subprocess
.
PIPE
)
proc
=
subprocess
.
Popen
(
rdp_command
,
stdout
=
subprocess
.
PIPE
)
global_vars
.
pid
=
proc
.
pid
global_vars
.
pid
=
proc
.
pid
proc
.
wait
()
proc
.
wait
()
self
.
box
.
response
(
-
5
)
except
subprocess
.
CalledProcessError
as
e
:
global_vars
.
pid
=
0
if
e
.
returncode
!=
1
:
print
e
self
.
dialog_box
(
"Unable to connect to host: "
+
self
.
host
+
" at port "
+
self
.
port
)
finally
:
#print "Finally: "
#print self.box
global_vars
.
pid
=
0
self
.
box
.
response
(
-
5
)
def
connect_nx
(
self
):
def
connect_nx
(
self
):
#Generate temproary config
#Generate temproary config
...
...
miscellaneous/laborclient/setup.py
View file @
7a77678d
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
setup
(
setup
(
name
=
"CloudGUI"
,
name
=
"CloudGUI"
,
version
=
"0.
1
"
,
version
=
"0.
2
"
,
packages
=
[
'cloudgui'
,],
packages
=
[
'cloudgui'
,],
scripts
=
[
'cloud'
,
'rdp'
,],
scripts
=
[
'cloud'
,
'rdp'
,],
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment