diff options
author | Victor Häggqvist <[email protected]> | 2015-12-09 23:08:01 +0100 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2015-12-09 23:08:01 +0100 |
commit | 7cc18f8ca8020cb7dbf9aac46b35d07594314ae3 (patch) | |
tree | b424a0cc651db2becd706b1fe2622be263178325 | |
parent | dfcdca379234a648f277d70aa0cc98d5b84b5645 (diff) |
catch empty search
-rwxr-xr-x | giti | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -50,6 +50,10 @@ def search_for_file(kind: str) -> str: print("Found match {}".format(name)) return cont['items'][i]['path'] + if len(cont['items']) < 1: + print("Search found nothing") + return None + print('One of these might be good:') for i in range(0, len(cont['items'])): name = cont['items'][i]['name'].split('.')[0] |