diff options
| author | Thomas Kluyver <takowl@gmail.com> | 2012-06-12 22:48:23 +0100 |
|---|---|---|
| committer | Thomas Kluyver <takowl@gmail.com> | 2012-06-12 22:48:23 +0100 |
| commit | f4bc3a3a898e8487265db7c5cb3bb2757c07bd67 (patch) | |
| tree | 8aae58cd6ae6a46f35074e957bf6d658e1c7b08e | |
| parent | bf5711e3830db803bc8f038976b2801a854a063b (diff) | |
Update RecentFiles module & add test script.
| -rw-r--r-- | test/test-recentfiles.py | 5 | ||||
| -rw-r--r-- | xdg/RecentFiles.py | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/test-recentfiles.py b/test/test-recentfiles.py new file mode 100644 index 0000000..5fcda49 --- /dev/null +++ b/test/test-recentfiles.py @@ -0,0 +1,5 @@ +from xdg import RecentFiles + +rf = RecentFiles.RecentFiles() +rf.parse() +print(rf.getFiles()[0]) diff --git a/xdg/RecentFiles.py b/xdg/RecentFiles.py index 6c2cd85..d54ebcc 100644 --- a/xdg/RecentFiles.py +++ b/xdg/RecentFiles.py @@ -148,6 +148,9 @@ class RecentFile: def __cmp__(self, other): return cmp(self.Timestamp, other.Timestamp) + + def __lt__ (self, other): + return self.Timestamp < other.Timestamp def __eq__(self, other): if self.URI == str(other): |
