summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-04-07 23:45:48 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-04-07 23:45:48 +0200
commit4ae9bd9a9c6ffca3301858b3c8d95ca4cf2b78dc (patch)
tree0382ee39c1f362512b201c7dbdaade506aeddf74
parent87440084fc62f1ebb1a2ad96041740df994071f4 (diff)
downloadportato-4ae9bd9a9c6ffca3301858b3c8d95ca4cf2b78dc.tar.gz
portato-4ae9bd9a9c6ffca3301858b3c8d95ca4cf2b78dc.tar.bz2
portato-4ae9bd9a9c6ffca3301858b3c8d95ca4cf2b78dc.zip
Fixed pyflakes errors
Diffstat (limited to '')
-rw-r--r--portato/backend/flags.py1
-rw-r--r--portato/backend/portage/package.py2
-rw-r--r--portato/backend/portage/system.py2
-rw-r--r--portato/db/dict.py2
-rw-r--r--portato/gui/exception_handling.py3
-rw-r--r--portato/gui/queue.py3
-rw-r--r--portato/gui/windows/main.py12
-rw-r--r--portato/helper.py4
-rw-r--r--portato/session.py2
-rw-r--r--setup.py4
10 files changed, 15 insertions, 20 deletions
diff --git a/portato/backend/flags.py b/portato/backend/flags.py
index 5d786b8..8f5723d 100644
--- a/portato/backend/flags.py
+++ b/portato/backend/flags.py
@@ -13,7 +13,6 @@
from __future__ import absolute_import, with_statement
import os
-import os.path
import itertools as itt
from subprocess import Popen, PIPE # needed for grep
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index e1813bf..4ea1111 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -16,7 +16,7 @@ from ..package import Package
from .. import flags
from .. import system
from ..exceptions import BlockedException, PackageNotFoundException, DependencyCalcError
-from ...helper import debug, error, unique_array
+from ...helper import debug, error
import portage
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index 94b5ca1..eae8465 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -12,7 +12,7 @@
from __future__ import absolute_import, with_statement
-import re, os, os.path
+import re, os
import portage
from collections import defaultdict
diff --git a/portato/db/dict.py b/portato/db/dict.py
index 4992df6..279ab97 100644
--- a/portato/db/dict.py
+++ b/portato/db/dict.py
@@ -14,8 +14,8 @@ from __future__ import absolute_import, with_statement
import re
from collections import defaultdict
-from threading import RLock
+from ..helper import info
from ..backend import system
from .database import Database, PkgData
diff --git a/portato/gui/exception_handling.py b/portato/gui/exception_handling.py
index 2e9c76c..3928680 100644
--- a/portato/gui/exception_handling.py
+++ b/portato/gui/exception_handling.py
@@ -14,14 +14,13 @@
from __future__ import absolute_import, with_statement
import gtk, pango, gobject
-import sys, traceback, os
+import sys, traceback
from StringIO import StringIO
from ..helper import debug, error, get_runsystem
from .dialogs import file_chooser_dialog, io_ex_dialog
from .windows.mailinfo import MailInfoWindow
-from .utils import GtkThread
class UncaughtExceptionDialog(gtk.MessageDialog):
"""Original idea by Gustavo Carneiro - original code: http://www.daa.com.au/pipermail/pygtk/attachments/20030828/2d304204/gtkexcepthook.py."""
diff --git a/portato/gui/queue.py b/portato/gui/queue.py
index d7b1e3f..5261fc9 100644
--- a/portato/gui/queue.py
+++ b/portato/gui/queue.py
@@ -15,14 +15,13 @@ from __future__ import absolute_import
# some stuff needed
import os, pty
import signal, threading, time
-import itertools as itt
from subprocess import Popen
# some backend things
from .. import backend, plugin
from ..backend import flags, system
from ..backend.exceptions import BlockedException
-from ..helper import debug, info, warning, error, send_signal_to_group, unique_array, flatten
+from ..helper import debug, info, warning, error
from ..waiting_queue import WaitingQueue
from ..odict import OrderedDict
from .updater import Updater
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 103b792..a0127e0 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -17,17 +17,17 @@ import gtk
import gobject
# other
-import os.path
+import os
import itertools as itt
from collections import defaultdict
# our backend stuff
from ...backend import flags, system # must be the first to avoid circular deps
from ... import get_listener, plugin
-from ...helper import debug, warning, error, info, unique_array
+from ...helper import debug, warning, error, info
from ...session import Session
from ...db import Database
-from ...constants import CONFIG_LOCATION, VERSION, APP_ICON, ICON_DIR
+from ...constants import CONFIG_LOCATION, VERSION, APP_ICON
from ...backend.exceptions import PackageNotFoundException, BlockedException, VersionsNotFoundException
# more GUI stuff
@@ -186,12 +186,12 @@ class PackageTable:
# useflags
flaglist = list(itt.ifilterfalse(pkg.use_expanded, pkg.get_iuse_flags()))
flaglist.sort()
- flags = ", ".join(flaglist)
+ flagstr = ", ".join(flaglist)
- if flags:
+ if flagstr:
self.useFlagsLL.show()
self.useFlagsLabel.show()
- self.useFlagsLabel.set_label(flags)
+ self.useFlagsLabel.set_label(flagstr)
else:
self.useFlagsLL.hide()
self.useFlagsLabel.hide()
diff --git a/portato/helper.py b/portato/helper.py
index 5b275d6..1861ae6 100644
--- a/portato/helper.py
+++ b/portato/helper.py
@@ -15,9 +15,7 @@ Some nice functions used in the program.
"""
from __future__ import absolute_import, with_statement
-import os, signal, logging, grp
-
-from .log import set_log_level
+import os, signal, logging
debug = logging.getLogger("portatoLogger").debug
info = logging.getLogger("portatoLogger").info
diff --git a/portato/session.py b/portato/session.py
index 667771a..2017544 100644
--- a/portato/session.py
+++ b/portato/session.py
@@ -12,7 +12,7 @@
from __future__ import absolute_import, with_statement
-import os, os.path
+import os
from UserDict import DictMixin
from .config_parser import ConfigParser, SectionNotFoundException
diff --git a/setup.py b/setup.py
index 3117291..64bcea6 100644
--- a/setup.py
+++ b/setup.py
@@ -11,9 +11,9 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-import sys, os, os.path
+import os
from distutils.core import setup
-from portato.constants import VERSION, DATA_DIR, ICON_DIR, PLUGIN_DIR, TEMPLATE_DIR, APP
+from portato.constants import VERSION, ICON_DIR, PLUGIN_DIR, TEMPLATE_DIR, APP
from build_manpage import build_manpage