We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 578dc84 commit 4dff3a0Copy full SHA for 4dff3a0
payload/Library/Python/2.7/site-packages/docklib.py
@@ -114,9 +114,10 @@ def save(self):
114
def findExistingLabel(self, test_label, section="persistent-apps"):
115
"""Returns index of item with label matching test_label or -1 if not
116
found."""
117
- for index in range(len(self.items[section])):
118
- if self.items[section][index]["tile-data"].get("file-label") == test_label:
119
- return index
+ if self.items[section]:
+ for index in range(len(self.items[section])):
+ if self.items[section][index]["tile-data"].get("file-label") == test_label:
120
+ return index
121
122
return -1
123
0 commit comments