[hamster-applet] unused imports
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] unused imports
- Date: Wed, 26 May 2010 23:21:39 +0000 (UTC)
commit 326e29c8f555d00bf7ea5565d9a54f112fdcee58
Author: Toms Bauģis <toms baugis gmail com>
Date: Thu May 27 00:18:30 2010 +0100
unused imports
src/hamster-applet | 1 -
src/hamster-client | 3 +--
src/hamster-standalone | 1 -
src/hamster/configuration.py | 8 ++------
src/hamster/db.py | 1 -
5 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/src/hamster-applet b/src/hamster-applet
index f303668..5071aee 100755
--- a/src/hamster-applet
+++ b/src/hamster-applet
@@ -23,7 +23,6 @@ import gtk, gnomeapplet
import sys
from optparse import OptionParser
import os.path
-import gettext, locale
import gnome
import logging
import gobject
diff --git a/src/hamster-client b/src/hamster-client
index 4ea01c0..e8dafa8 100755
--- a/src/hamster-client
+++ b/src/hamster-client
@@ -24,10 +24,9 @@
import sys, os
import optparse
import re
-import locale, gettext
import datetime as dt
-from hamster import client, defs, stuff
+from hamster import client, stuff
class ConfigurationError(Exception):
'''An error of configuration.'''
diff --git a/src/hamster-standalone b/src/hamster-standalone
index 909a510..ebe0ad9 100755
--- a/src/hamster-standalone
+++ b/src/hamster-standalone
@@ -21,7 +21,6 @@
import logging
import datetime as dt
-import gettext, locale
import os.path
import gtk
diff --git a/src/hamster/configuration.py b/src/hamster/configuration.py
index 7d85da9..2381273 100644
--- a/src/hamster/configuration.py
+++ b/src/hamster/configuration.py
@@ -23,9 +23,7 @@ License: GPLv2
"""
import gconf
-import gettext
import os
-from os.path import exists, dirname, realpath
from client import Storage
from xdg.BaseDirectory import xdg_data_home
import logging
@@ -54,15 +52,13 @@ class RuntimeStore(Singleton):
def __init__(self):
- gettext.install("hamster-applet", unicode = True)
-
# Makefile.in shouldn't be in the final install
try:
import defs
self.data_dir = os.path.join(defs.DATA_DIR, "hamster-applet")
self.version = defs.VERSION
except:
- module_dir = dirname(realpath(__file__))
+ module_dir = os.path.dirname(os.path.realpath(__file__))
self.data_dir = os.path.join(module_dir, '..', '..', 'data')
self.version = "uninstalled"
@@ -75,7 +71,7 @@ class RuntimeStore(Singleton):
# move database to ~/.local/share/hamster-applet
if os.path.exists(old_db_file):
- db_path, _ = os.path.split(os.path.realpath(new_db_file))
+ db_path = os.path.split(os.path.realpath(new_db_file), 1)[0]
if not os.path.exists(db_path):
try:
os.makedirs(db_path, 0744)
diff --git a/src/hamster/db.py b/src/hamster/db.py
index b1da28b..3296159 100644
--- a/src/hamster/db.py
+++ b/src/hamster/db.py
@@ -38,7 +38,6 @@ import storage
import stuff
from shutil import copy as copyfile
import datetime as dt
-import gettext
from xdg.BaseDirectory import xdg_data_home
import gio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]