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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Peter Shkenev
gajim
Commits
3e9b8d6b
Commit
3e9b8d6b
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
enormous cleanup in untested code
parent
8bc51f53
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/optparser.py
+6
-10
6 additions, 10 deletions
src/common/optparser.py
src/gajim.py
+6
-7
6 additions, 7 deletions
src/gajim.py
with
12 additions
and
17 deletions
src/common/optparser.py
+
6
−
10
View file @
3e9b8d6b
...
...
@@ -101,18 +101,14 @@ def write(self):
pass
self
.
__tempfile
=
os
.
path
.
join
(
base_dir
,
'
.
'
+
filename
)
try
:
fd
=
open
(
self
.
__tempfile
,
'
w
'
)
except
:
#chances are we cannot write file in a directory
err_str
=
_
(
'
Unable to write file in %s
'
)
%
base_dir
print
err_str
return
err_str
f
=
open
(
self
.
__tempfile
,
'
w
'
)
except
IOError
,
e
:
return
str
(
e
)
try
:
gajim
.
config
.
foreach
(
self
.
write_line
,
fd
)
except
IOError
,
e
:
fd
.
close
()
return
e
.
errno
fd
.
close
()
return
str
(
e
)
f
.
close
()
if
os
.
path
.
exists
(
self
.
__filename
):
# win32 needs this
try
:
...
...
@@ -122,7 +118,7 @@ def write(self):
try
:
os
.
rename
(
self
.
__tempfile
,
self
.
__filename
)
except
IOError
,
e
:
return
e
.
errno
return
str
(
e
)
os
.
chmod
(
self
.
__filename
,
0600
)
def
update_config
(
self
,
old_version
,
new_version
):
...
...
This diff is collapsed.
Click to expand it.
src/gajim.py
+
6
−
7
View file @
3e9b8d6b
...
...
@@ -1204,19 +1204,18 @@ def process_connections(self):
gajim
.
mutex_events_for_ui
.
unlock
()
time
.
sleep
(
0.01
)
# so threads in connection.py have time to run
return
True
# renew timeout (loop for ever)
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
# FIXME: can this happen?? CTRL+C IS CATCHED BY SIGNAL
sys
.
exit
()
return
False
def
save_config
(
self
):
err_code
=
parser
.
write
()
if
err_code
is
not
None
:
strerr
=
os
.
strerror
(
err_code
)
print
strerr
err_str
=
parser
.
write
()
if
err_str
is
not
None
:
print
>>
sys
.
stderr
,
err_str
# it is good to notify the user
# in case he or she cannot see the output of the console
dialogs
.
ErrorDialog
(
_
(
'
C
an
not save your preferences
'
),
strer
r
).
get_response
()
dialogs
.
ErrorDialog
(
_
(
'
C
ould
not save your
settings and
preferences
'
),
err_st
r
).
get_response
()
sys
.
exit
(
1
)
def
__init__
(
self
):
...
...
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