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
Weblate
gajim
Commits
02124ea2
Commit
02124ea2
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
fix typo of isinstance. fixes #1552
parent
8448be52
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
src/gajim-remote.py
+7
-7
7 additions, 7 deletions
src/gajim-remote.py
with
7 additions
and
7 deletions
src/gajim-remote.py
+
7
−
7
View file @
02124ea2
...
...
@@ -340,18 +340,18 @@ class GajimRemote:
def
print_info
(
self
,
level
,
prop_dict
):
'''
return formated string from serialized vcard data
'''
if
prop_dict
is
None
or
not
isinstance
(
prop_dict
,
dict
,
list
,
tuple
):
if
prop_dict
is
None
or
not
isinstance
(
prop_dict
,
(
dict
,
list
,
tuple
)
)
:
return
''
ret_str
=
''
if
isinstance
(
prop_dict
,
list
,
tuple
):
if
isinstance
(
prop_dict
,
(
list
,
tuple
)
)
:
ret_str
=
''
spacing
=
'
'
*
level
*
4
for
val
in
prop_dict
:
if
val
is
None
:
ret_str
+=
'
\t
'
elif
isinstance
(
val
,
unicode
,
int
,
str
):
elif
isinstance
(
val
,
(
unicode
,
int
,
str
)
)
:
ret_str
+=
'
\t
'
+
str
(
val
)
elif
isinstance
(
val
,
list
,
tuple
):
elif
isinstance
(
val
,
(
list
,
tuple
)
)
:
res
=
''
for
items
in
val
:
res
+=
self
.
print_info
(
level
+
1
,
items
)
...
...
@@ -364,11 +364,11 @@ class GajimRemote:
for
key
in
prop_dict
.
keys
():
val
=
prop_dict
[
key
]
spacing
=
'
'
*
level
*
4
if
isinstance
(
val
,
unicode
,
int
,
str
):
if
isinstance
(
val
,
(
unicode
,
int
,
str
)
)
:
if
val
is
not
None
:
val
=
val
.
strip
()
ret_str
+=
'
%s%-10s: %s
\n
'
%
(
spacing
,
key
,
val
)
elif
isinstance
(
val
,
list
,
tuple
):
elif
isinstance
(
val
,
(
list
,
tuple
)
)
:
res
=
''
for
items
in
val
:
res
+=
self
.
print_info
(
level
+
1
,
items
)
...
...
@@ -466,7 +466,7 @@ class GajimRemote:
if
value
[
1
]
==
'
}
'
:
break
key
,
next
=
self
.
unrepr
(
value
[
1
:])
if
not
isinstance
(
key
,
str
,
unicode
):
if
not
isinstance
(
key
,
(
str
,
unicode
)
)
:
send_error
(
'
Wrong string: %s
'
%
value
)
next
=
next
.
strip
()
if
not
next
or
next
[
0
]
!=
'
:
'
:
...
...
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