Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
irker
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
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
iDB
irker
Commits
d72ffd60
Commit
d72ffd60
authored
12 years ago
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
pylint cleanup.
parent
796f8501
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
irker.py
+4
-3
4 additions, 3 deletions
irker.py
with
4 additions
and
3 deletions
irker.py
+
4
−
3
View file @
d72ffd60
...
...
@@ -27,7 +27,7 @@ NAMESTYLE = "irker%03d" # IRC nick template - must contain '%d'
# No user-serviceable parts below this line
import
os
,
sys
,
json
,
exceptions
,
getopt
,
urlparse
,
time
,
socket
import
sys
,
json
,
exceptions
,
getopt
,
urlparse
,
time
,
socket
import
threading
,
Queue
,
SocketServer
import
irclib
...
...
@@ -44,7 +44,7 @@ class Session():
self
.
server
=
None
# Server connection setup
parsed
=
urlparse
.
urlparse
(
url
)
host
,
sep
,
port
=
parsed
.
netloc
.
partition
(
'
:
'
)
host
,
_
,
port
=
parsed
.
netloc
.
partition
(
'
:
'
)
if
not
port
:
port
=
6667
self
.
servername
=
host
...
...
@@ -55,6 +55,7 @@ class Session():
self
.
thread
=
threading
.
Thread
(
target
=
self
.
dequeue
)
self
.
thread
.
daemon
=
True
self
.
thread
.
start
()
self
.
last_active
=
None
def
enqueue
(
self
,
message
):
"
Enque a message for transmission.
"
self
.
queue
.
put
(
message
)
...
...
@@ -136,7 +137,7 @@ class Irker:
def
close
(
self
,
servername
,
port
):
"
Release a server instance and all sessions using it.
"
del
self
.
countmap
[(
servername
,
port
)]
for
(
key
,
val
)
in
self
.
sessions
:
for
val
in
self
.
sessions
.
values
()
:
if
(
val
.
servername
,
val
.
port
)
==
(
servername
,
port
):
self
.
sessions
[
servername
].
terminate
()
del
self
.
sessions
[
servername
]
...
...
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