Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
8df5e7ef
Commit
8df5e7ef
authored
19 years ago
by
dkirov
Browse files
Options
Downloads
Patches
Plain Diff
two small errors on win
parent
9834fd62
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/nslookup.py
+9
-6
9 additions, 6 deletions
src/common/nslookup.py
with
9 additions
and
6 deletions
src/common/nslookup.py
+
9
−
6
View file @
8df5e7ef
...
...
@@ -24,7 +24,7 @@
import
sys
,
os
,
sre
from
xmpp.idlequeue
import
IdleObject
,
IdleQueue
from
xmpp.idlequeue
import
*
if
os
.
name
==
'
nt
'
:
from
subprocess
import
*
elif
os
.
name
==
'
posix
'
:
...
...
@@ -205,6 +205,7 @@ class IdleCommand(IdleObject):
if
self
.
endtime
<
self
.
idlequeue
.
current_time
():
self
.
_return_result
()
self
.
pipe
.
stdout
.
close
()
self
.
pipe
.
stdin
.
close
()
else
:
# child is still active, continue to wait
self
.
idlequeue
.
set_alarm
(
self
.
wait_child
,
0.1
)
...
...
@@ -230,7 +231,7 @@ class IdleCommand(IdleObject):
self
.
pipe
=
Popen
(
self
.
_compose_command_args
(),
stdout
=
PIPE
,
bufsize
=
1024
,
shell
=
True
,
stderr
=
STDOUT
,
stdin
=
PIPE
)
if
self
.
commandtimeout
>=
0
:
self
.
endtime
=
self
.
idlequeue
.
current_time
()
self
.
endtime
=
self
.
idlequeue
.
current_time
()
+
self
.
commandtimeout
self
.
idlequeue
.
set_alarm
(
self
.
wait_child
,
0.1
)
def
_start_posix
(
self
):
...
...
@@ -270,7 +271,7 @@ class IdleCommand(IdleObject):
class
NsLookup
(
IdleCommand
):
def
__init__
(
self
,
on_result
,
host
=
'
_xmpp-client
'
,
type
=
'
srv
'
):
IdleCommand
.
__init__
(
self
,
on_result
)
self
.
commandtimeout
=
3
0
self
.
commandtimeout
=
1
0
self
.
host
=
host
.
lower
()
self
.
type
=
type
.
lower
()
if
not
host_pattern
.
match
(
self
.
host
):
...
...
@@ -296,12 +297,14 @@ class NsLookup(IdleCommand):
# TODO: remove below lines if there is nothing more to test
if
__name__
==
'
__main__
'
:
if
os
.
name
!=
'
posix
'
:
sys
.
exit
()
if
os
.
name
==
'
posix
'
:
idlequeue
=
IdleQueue
()
elif
os
.
name
==
'
nt
'
:
idlequeue
=
SelectIdleQueue
()
# testing Resolver class
import
gobject
import
gtk
idlequeue
=
IdleQueue
()
resolver
=
Resolver
(
idlequeue
)
def
clicked
(
widget
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment