summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-03-09 21:01:50 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-03-09 21:01:50 +0100
commit9bcef08ae6212926b0f8c04143e0c5ce4dae34b0 (patch)
tree6af5ef9cb0d97530e636a54cd44d61cc7a90fd55 /portato
parent06a6fd0a550a226a2d404d415ee50a249b5ffade (diff)
downloadportato-9bcef08ae6212926b0f8c04143e0c5ce4dae34b0.tar.gz
portato-9bcef08ae6212926b0f8c04143e0c5ce4dae34b0.tar.bz2
portato-9bcef08ae6212926b0f8c04143e0c5ce4dae34b0.zip
Fix the index error on pkglist jump.v0.12.1
Diffstat (limited to '')
-rw-r--r--portato/gui/windows/main.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 5b3bf7e..cbb5bf1 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -1200,7 +1200,15 @@ class MainWindow (Window):
model = self.pkgList.get_model()
if name:
- if model[pos][col] != name: # need to search :(
+ search = False
+ try:
+ row = model[pos]
+ except IndexError: # position not in model
+ search = True
+ else:
+ search = (row[col] != name)
+
+ if search:
debug("Pkg path does not match. Searching...")
for cname, path in ((x[col], x.path) for x in model):
if cname == name:
@@ -1227,7 +1235,15 @@ class MainWindow (Window):
else:
sname = None
- if sname is None and model[pos][col] != name: # need to search in normal list
+ search = False
+ try:
+ row = model[pos]
+ except IndexError: # position not in model
+ search = True
+ else:
+ search = (row[col] != name)
+
+ if sname is None and search: # need to search in normal list
debug("Cat path does not match. Searching...")
for cname, path in ((x[col], x.path) for x in model):
if cname == name:
=v0.8.0&id=9d927b399e409990003b25efa8ca7395e9cad021&follow=1'>Issue #46: Improvements; add testsRené 'Necoro' Neumann2-1/+48 2021-02-15Bump github.com/google/uuid from 1.1.4 to 1.2.0dependabot[bot]2-3/+3 Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.4 to 1.2.0. - [Release notes](https://github.com/google/uuid/releases) - [Commits](https://github.com/google/uuid/compare/v1.1.4...v1.2.0) Signed-off-by: dependabot[bot] <support@github.com> 2021-02-15Issue #46: Make the resulting email body not to include single \r or \n. ↵René 'Necoro' Neumann2-2/+66 This now pleases Cyrus IMAP. 2021-01-20Bump github.com/PuerkitoBio/goquery from 1.6.0 to 1.6.1dependabot[bot]2-3/+3 Bumps [github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/PuerkitoBio/goquery/releases) - [Commits](https://github.com/PuerkitoBio/goquery/compare/v1.6.0...v1.6.1) Signed-off-by: dependabot[bot] <support@github.com> 2021-01-09Bump github.com/google/uuid from 1.1.2 to 1.1.4dependabot[bot]2-3/+3 Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.2 to 1.1.4. - [Release notes](https://github.com/google/uuid/releases) - [Commits](https://github.com/google/uuid/compare/v1.1.2...v1.1.4) Signed-off-by: dependabot[bot] <support@github.com> 2021-01-09Bump github.com/emersion/go-message from 0.14.0 to 0.14.1 (#42)dependabot[bot]2-3/+3 Bumps [github.com/emersion/go-message](https://github.com/emersion/go-message) from 0.14.0 to 0.14.1. - [Release notes](https://github.com/emersion/go-message/releases) - [Commits](https://github.com/emersion/go-message/compare/v0.14.0...v0.14.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2020-11-28Bump github.com/emersion/go-message from 0.13.0 to 0.14.0 (#38)dependabot[bot]2-3/+9 Bumps [github.com/emersion/go-message](https://github.com/emersion/go-message) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/emersion/go-message/releases) - [Commits](https://github.com/emersion/go-message/compare/v0.13.0...v0.14.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2020-11-28Bump github.com/google/go-cmp from 0.5.2 to 0.5.4 (#37)dependabot[bot]2-3/+3 Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.2 to 0.5.4. - [Release notes](https://github.com/google/go-cmp/releases) - [Commits](https://github.com/google/go-cmp/compare/v0.5.2...v0.5.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2020-11-23Fix release.ymlv0.5.2René 'Necoro' Neumann1-3/+10 2020-11-23Prepare v0.5.2René 'Necoro' Neumann3-3/+8 2020-11-20Bump github.com/gabriel-vasile/mimetype from 1.1.1 to 1.1.2dependabot[bot]2-3/+3 Bumps [github.com/gabriel-vasile/mimetype](https://github.com/gabriel-vasile/mimetype) from 1.1.1 to 1.1.2. - [Release notes](https://github.com/gabriel-vasile/mimetype/releases) - [Changelog](https://github.com/gabriel-vasile/mimetype/blob/master/CHANGELOG.md) - [Commits](https://github.com/gabriel-vasile/mimetype/compare/v1.1.1...v1.1.2) Signed-off-by: dependabot[bot] <support@github.com> 2020-11-04Clean dependabot.ymlRené 'Necoro' Neumann1-4/+0