diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-09-15 14:38:39 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-09-15 14:38:39 +0200 |
commit | adc195c45f67bb3da1b1e37fe6284a72c74f5c9d (patch) | |
tree | 8f5ea524fd4a498defd4f24c7811b955fa2b895c /portato/gui | |
parent | de62ee741abca9655e8556eb1cebb9dd5d6d2d38 (diff) | |
download | portato-adc195c45f67bb3da1b1e37fe6284a72c74f5c9d.tar.gz portato-adc195c45f67bb3da1b1e37fe6284a72c74f5c9d.tar.bz2 portato-adc195c45f67bb3da1b1e37fe6284a72c74f5c9d.zip |
Some small readability changes
Diffstat (limited to '')
-rw-r--r-- | portato/gui/queue.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/portato/gui/queue.py b/portato/gui/queue.py index 3aaeb5b..610bc49 100644 --- a/portato/gui/queue.py +++ b/portato/gui/queue.py @@ -302,7 +302,7 @@ class EmergeQueue: else: # unmerge self.unmergequeue.append(cpv) if self.tree: # update tree - self.iters["uninstall"].update({cpv: self.tree.append(self.tree.get_unmerge_it(), self.tree.build_append_value(cpv))}) + self.iters["uninstall"][cpv] = self.tree.append(self.tree.get_unmerge_it(), self.tree.build_append_value(cpv)) def _queue_append (self, cpv, oneshot = False): """Convenience function appending a cpv either to self.mergequeue or to self.oneshotmerge. @@ -362,7 +362,7 @@ class EmergeQueue: os.dup2(self.pty[1], 2) # get all categories that are being touched during the emerge process - cats = set(map(lambda x: x.split("/")[0], it.iterkeys())) + cats = set(x.split("/")[0] for x in it.iterkeys()) # start emerge self.process = Popen(command+options+packages, shell = False, env = system.get_environment(), preexec_fn = pre) @@ -377,14 +377,14 @@ class EmergeQueue: if self.console: old_title = self.console.get_window_title() while self.process and self.process.poll() is None: - if self.title_update : + if self.title_update: title = self.console.get_window_title() if title != old_title: self.title_update(title) old_title = title time.sleep(0.5) - if self.up: + if self.up: self.up.stop() if it: self.tree.set_in_progress(top, False) @@ -472,7 +472,7 @@ class EmergeQueue: @param options: Additional options to send to the emerge command @type options: string[]""" - if len(self.unmergequeue) == 0: return # nothing in queue + if not self.unmergequeue: return # nothing in queue list = self.unmergequeue[:] # copy the unmerge-queue |