Advertisement
Guest User

duplicity/gdocs backend : relax type testing.

a guest
Jul 4th, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. --- duplicity/backends/gdocsbackend.orig.py    2013-07-04 08:22:24.030257937 +0200
  2. +++ duplicity/backends/gdocsbackend.py 2013-07-04 07:59:17.593542649 +0200
  3. @@ -220,7 +220,12 @@
  4.              if title:
  5.                  result = []
  6.                  for entry in entries:
  7. -                    if (not type) or (entry.get_resource_type() == type):
  8. +                    entry_type = entry.get_resource_type().split('/')[0]
  9. +
  10. +                    if (not type) or (type.split('/')[0] == entry_type):
  11.                          if folder_id != GDocsBackend.ROOT_FOLDER_ID:
  12.                              for link in entry.in_collections():
  13.                                  folder_entry = self.client.get_entry(link.href, None, None,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement