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
85c957f4
Commit
85c957f4
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
cleanups in gajim-remote.py: use ininstance and use in and not in instead of many or
parent
20a7a0c4
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
scripts/gajim-remote.py
+8
-10
8 additions, 10 deletions
scripts/gajim-remote.py
with
8 additions
and
10 deletions
scripts/gajim-remote.py
+
8
−
10
View file @
85c957f4
...
...
@@ -192,7 +192,7 @@ Please specify account for sending the message.') % sys.argv[2])
else
:
self
.
send_error
(
_
(
'
You have no active account
'
))
elif
self
.
command
==
'
list_accounts
'
:
if
typ
e
(
res
)
==
list
:
if
isinstanc
e
(
res
,
list
)
:
for
account
in
res
:
print
account
elif
self
.
command
==
'
list_contacts
'
:
...
...
@@ -284,32 +284,30 @@ Please specify account for sending the message.') % sys.argv[2])
for
val
in
prop_dict
:
if
val
is
None
:
ret_str
+=
'
\t
'
elif
type
(
val
)
==
unicode
or
type
(
val
)
==
int
or
\
type
(
val
)
==
str
:
elif
type
(
val
)
in
(
unicode
,
int
,
str
):
ret_str
+=
'
\t
'
+
str
(
val
)
elif
type
(
val
)
==
list
or
type
(
val
)
==
tuple
:
elif
type
(
val
)
in
(
list
,
tuple
)
:
res
=
''
for
items
in
val
:
res
+=
self
.
print_info
(
level
+
1
,
items
)
if
res
!=
''
:
ret_str
+=
'
\t
'
+
res
ret_str
=
'
%s(%s)
\n
'
%
(
spacing
,
ret_str
[
1
:])
elif
typ
e
(
prop_dict
)
is
dict
:
elif
isinstanc
e
(
prop_dict
,
dict
)
:
for
key
in
prop_dict
.
keys
():
val
=
prop_dict
[
key
]
spacing
=
'
'
*
level
*
4
if
type
(
val
)
==
unicode
or
type
(
val
)
==
int
or
\
type
(
val
)
==
str
:
elif
type
(
val
)
in
(
unicode
,
int
,
str
):
if
val
is
not
None
:
val
=
val
.
strip
()
ret_str
+=
'
%s%-10s: %s
\n
'
%
(
spacing
,
key
,
val
)
elif
type
(
val
)
==
list
or
type
(
val
)
==
tuple
:
elif
type
(
val
)
in
(
list
,
tuple
)
:
res
=
''
for
items
in
val
:
res
+=
self
.
print_info
(
level
+
1
,
items
)
if
res
!=
''
:
ret_str
+=
'
%s%s:
\n
%s
'
%
(
spacing
,
key
,
res
)
elif
typ
e
(
val
)
==
dict
:
elif
isinstanc
e
(
val
,
dict
)
:
res
=
self
.
print_info
(
level
+
1
,
val
)
if
res
!=
''
:
ret_str
+=
'
%s%s:
\n
%s
'
%
(
spacing
,
key
,
res
)
...
...
@@ -395,7 +393,7 @@ Please specify account for sending the message.') % sys.argv[2])
if
value
[
1
]
==
'
}
'
:
break
key
,
next
=
self
.
unrepr
(
value
[
1
:])
if
type
(
key
)
!=
str
and
type
(
key
)
!=
unicode
:
if
type
(
key
)
not
in
(
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