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
3535249b
Commit
3535249b
authored
18 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
py25 comes with pysqlite module in the stdlib
parent
307abbc3
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
+8
-1
8 additions, 1 deletion
src/common/check_paths.py
src/common/optparser.py
+22
-7
22 additions, 7 deletions
src/common/optparser.py
src/history_manager.py
+6
-2
6 additions, 2 deletions
src/history_manager.py
with
36 additions
and
10 deletions
src/common/check_paths.py
+
8
−
1
View file @
3535249b
...
...
@@ -20,7 +20,14 @@ import stat
from
common
import
gajim
import
logger
from
pysqlite2
import
dbapi2
as
sqlite
# DO NOT MOVE ABOVE OF import gajim
# DO NOT MOVE ABOVE OF import gajim
try
:
import
sqlite3
as
sqlite
# python 2.5
except
ImportError
:
try
:
from
pysqlite2
import
dbapi2
as
sqlite
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
def
create_log_db
():
print
_
(
'
creating logs database
'
)
...
...
This diff is collapsed.
Click to expand it.
src/common/optparser.py
+
22
−
7
View file @
3535249b
...
...
@@ -207,9 +207,12 @@ class OptionsParser:
'''
create table unread_messages if there is no such table
'''
import
exceptions
try
:
from
pysqlite2
import
dbapi2
as
sqlite
import
sqlite3
as
sqlite
# python 2.5
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
try
:
from
pysqlite2
import
dbapi2
as
sqlite
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
import
logger
con
=
sqlite
.
connect
(
logger
.
LOG_DB_PATH
)
...
...
@@ -283,9 +286,12 @@ class OptionsParser:
'''
create table transports_cache if there is no such table
'''
import
exceptions
try
:
from
pysqlite2
import
dbapi2
as
sqlite
import
sqlite3
as
sqlite
# python 2.5
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
try
:
from
pysqlite2
import
dbapi2
as
sqlite
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
import
logger
con
=
sqlite
.
connect
(
logger
.
LOG_DB_PATH
)
...
...
@@ -309,9 +315,12 @@ class OptionsParser:
'''
apply indeces to the logs database
'''
import
exceptions
try
:
from
pysqlite2
import
dbapi2
as
sqlite
import
sqlite3
as
sqlite
# python 2.5
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
try
:
from
pysqlite2
import
dbapi2
as
sqlite
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
import
logger
print
_
(
'
migrating logs database to indeces
'
)
con
=
sqlite
.
connect
(
logger
.
LOG_DB_PATH
)
...
...
@@ -333,7 +342,13 @@ class OptionsParser:
def
update_config_to_01015
(
self
):
'''
clean show values in logs database
'''
from
pysqlite2
import
dbapi2
as
sqlite
try
:
import
sqlite3
as
sqlite
# python 2.5
except
ImportError
:
try
:
from
pysqlite2
import
dbapi2
as
sqlite
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
import
logger
con
=
sqlite
.
connect
(
logger
.
LOG_DB_PATH
)
cur
=
con
.
cursor
()
...
...
This diff is collapsed.
Click to expand it.
src/history_manager.py
+
6
−
2
View file @
3535249b
...
...
@@ -44,10 +44,14 @@ C_SUBJECT,
C_NICKNAME
)
=
range
(
2
,
6
)
try
:
from
pysqlite2
import
dbapi2
as
sqlite
import
sqlite3
as
sqlite
# python 2.5
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
try
:
from
pysqlite2
import
dbapi2
as
sqlite
except
ImportError
:
raise
exceptions
.
PysqliteNotAvailable
class
HistoryManager
:
...
...
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