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
6e29a8b5
Commit
6e29a8b5
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
create config file with 0600 [and remove \n from print!!!!!
parent
5570639b
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
src/common/optparser.py
+6
-5
6 additions, 5 deletions
src/common/optparser.py
with
6 additions
and
5 deletions
src/common/optparser.py
+
6
−
5
View file @
6e29a8b5
...
...
@@ -2,7 +2,7 @@
## Gajim Team:
## - Yann Le Boulanger <asterix@lagaule.org>
## - Vincent Hanquez <tab@snarc.org>
##
- Nikos Kouremenos <kourem@gmail.com>
##
- Nikos Kouremenos <kourem@gmail.com>
##
## Copyright (C) 2003-2005 Gajim Team
##
...
...
@@ -47,8 +47,8 @@ class OptionsParser:
fd
=
open
(
self
.
__filename
)
except
:
if
os
.
path
.
exists
(
self
.
__filename
):
#it is file about file
print
_
(
'
error: cannot open %s for reading
\n
'
)
%
self
.
__filename
#it is file about file
FIXME: bad comment
print
_
(
'
error: cannot open %s for reading
'
)
%
self
.
__filename
return
for
line
in
fd
.
readlines
():
...
...
@@ -74,10 +74,11 @@ class OptionsParser:
try
:
fd
=
open
(
self
.
__tempfile
,
'
w
'
)
except
:
#we cannot write file in a directory
err_str
=
_
(
'
Unable to write file in %s
\n
'
)
%
base_dir
#
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
os
.
chmod
(
self
.
__filename
,
0600
)
try
:
gajim
.
config
.
foreach
(
self
.
write_line
,
fd
)
except
IOError
,
e
:
...
...
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