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
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
TSRh
gajim
Commits
9d04cd0a
Commit
9d04cd0a
authored
17 years ago
by
Brendan Taylor
Browse files
Options
Downloads
Patches
Plain Diff
a file for pickling retained secrets
parent
8af883e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/check_paths.py
+12
-0
12 additions, 0 deletions
src/common/check_paths.py
src/common/configpaths.py
+2
-2
2 additions, 2 deletions
src/common/configpaths.py
src/common/gajim.py
+1
-0
1 addition, 0 deletions
src/common/gajim.py
with
15 additions
and
2 deletions
src/common/check_paths.py
+
12
−
0
View file @
9d04cd0a
...
...
@@ -20,6 +20,8 @@
from
common
import
gajim
import
logger
import
pickle
# DO NOT MOVE ABOVE OF import gajim
try
:
import
sqlite3
as
sqlite
# python 2.5
...
...
@@ -84,6 +86,7 @@ def check_and_possibly_create_paths():
LOG_DB_PATH
=
logger
.
LOG_DB_PATH
VCARD_PATH
=
gajim
.
VCARD_PATH
AVATAR_PATH
=
gajim
.
AVATAR_PATH
SECRETS_PATH
=
gajim
.
SECRETS_PATH
dot_gajim
=
os
.
path
.
dirname
(
VCARD_PATH
)
if
os
.
path
.
isfile
(
dot_gajim
):
print
_
(
'
%s is a file but it should be a directory
'
)
%
dot_gajim
...
...
@@ -115,6 +118,13 @@ def check_and_possibly_create_paths():
print
_
(
'
%s is a directory but should be a file
'
)
%
LOG_DB_PATH
print
_
(
'
Gajim will now exit
'
)
sys
.
exit
()
if
not
os
.
path
.
exists
(
SECRETS_PATH
):
pickle
.
dump
({},
SECRETS_PATH
)
elif
os
.
path
.
isdir
(
SECRETS_PATH
):
print
_
(
'
%s is a directory but should be a file
'
)
%
SECRETS_PATH
print
_
(
'
Gajim will now exit
'
)
sys
.
exit
()
else
:
# dot_gajim doesn't exist
if
dot_gajim
:
# is '' on win9x so avoid that
...
...
@@ -126,6 +136,8 @@ def check_and_possibly_create_paths():
if
not
os
.
path
.
isfile
(
LOG_DB_PATH
):
create_log_db
()
gajim
.
logger
.
init_vars
()
if
not
os
.
path
.
isfile
(
SECRETS_PATH
):
pickle
.
dump
({},
SECRETS_PATH
)
def
create_path
(
directory
):
print
_
(
'
creating %s directory
'
)
%
directory
...
...
This diff is collapsed.
Click to expand it.
src/common/configpaths.py
+
2
−
2
View file @
9d04cd0a
...
...
@@ -77,8 +77,8 @@ def init():
paths
=
ConfigPaths
()
# LOG is deprecated
k
=
(
'
LOG
'
,
'
LOG_DB
'
,
'
VCARD
'
,
'
AVATAR
'
,
'
MY_EMOTS
'
)
v
=
(
u
'
logs
'
,
u
'
logs.db
'
,
u
'
vcards
'
,
u
'
avatars
'
,
u
'
emoticons
'
)
k
=
(
'
LOG
'
,
'
LOG_DB
'
,
'
VCARD
'
,
'
AVATAR
'
,
'
MY_EMOTS
'
,
'
SECRETS
'
)
v
=
(
u
'
logs
'
,
u
'
logs.db
'
,
u
'
vcards
'
,
u
'
avatars
'
,
u
'
emoticons
'
,
u
'
secrets
'
)
if
os
.
name
==
'
nt
'
:
v
=
map
(
lambda
x
:
x
.
capitalize
(),
v
)
...
...
This diff is collapsed.
Click to expand it.
src/common/gajim.py
+
1
−
0
View file @
9d04cd0a
...
...
@@ -71,6 +71,7 @@
VCARD_PATH
=
gajimpaths
[
'
VCARD
'
]
AVATAR_PATH
=
gajimpaths
[
'
AVATAR
'
]
MY_EMOTS_PATH
=
gajimpaths
[
'
MY_EMOTS
'
]
SECRETS_PATH
=
gajimpaths
[
'
SECRETS
'
]
TMP
=
gajimpaths
[
'
TMP
'
]
DATA_DIR
=
gajimpaths
[
'
DATA
'
]
HOME_DIR
=
gajimpaths
[
'
HOME
'
]
...
...
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