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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iDB
irker
Commits
ddb8d20b
Commit
ddb8d20b
authored
Oct 6, 2012
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
basestring makes the isinstance checks work.
parent
349c0051
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
irkerd
+4
-4
4 additions, 4 deletions
irkerd
with
4 additions
and
4 deletions
irkerd
+
4
−
4
View file @
ddb8d20b
...
...
@@ -428,15 +428,15 @@ class Irker:
else
:
channels
=
request
[
'
to
'
]
message
=
request
[
'
privmsg
'
]
if
type
(
channels
)
not
in
(
type
([]),
type
(
""
),
type
(
u
""
)):
if
not
isinstance
(
channels
,
(
list
,
basestring
)):
self
.
logerr
(
"
malformed request - unexpected channel type: %r
"
%
channels
)
if
type
(
message
)
not
in
(
type
(
""
),
type
(
u
""
)
):
if
not
isinstance
(
message
,
basestring
):
self
.
logerr
(
"
malformed request - unexpected message type: %r
"
%
message
)
else
:
if
type
(
channels
)
!=
type
([]
):
if
not
isinstance
(
channels
,
list
):
channels
=
[
channels
]
for
url
in
channels
:
if
not
type
(
url
)
in
(
type
(
""
),
type
(
u
""
)
):
if
not
isinstance
(
url
,
basestring
):
self
.
logerr
(
"
malformed request - URL has unexpected type: %r
"
%
url
)
else
:
target
=
Target
(
url
)
...
...
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