Skip to content

Commit fc6f401

Browse files
authored
Merge pull request #26 from homebysix/1.0.5-dev
1.0.5 merge to master
2 parents f9eb214 + 3893e13 commit fc6f401

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

Diff for: .pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.3.0
3+
rev: v2.4.0
44
hooks:
55
- id: check-added-large-files
66
args: [--maxkb=100]
@@ -14,16 +14,16 @@ repos:
1414
- id: trailing-whitespace
1515
args: [--markdown-linebreak-ext=md]
1616
- repo: https://github.com/ambv/black
17-
rev: 19.3b0
17+
rev: 19.10b0
1818
hooks:
1919
- id: black
2020
language_version: python3.7
2121
- repo: https://github.com/asottile/blacken-docs
22-
rev: v1.3.0
22+
rev: v1.5.0-1
2323
hooks:
2424
- id: blacken-docs
2525
additional_dependencies: [black==19.3b0]
2626
- repo: https://github.com/homebysix/pre-commit-macadmin
27-
rev: v1.4.0
27+
rev: v1.6.2
2828
hooks:
2929
- id: check-munkipkg-buildinfo

Diff for: CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ All notable changes to this project will be documented in this file. This projec
88
Nothing yet.
99

1010

11+
## [1.0.5] - 2020-01-29
12+
13+
### Fixed
14+
15+
- Avoids a TypeError that occurred when a dock "section" was None ([#24](https://github.com/homebysix/docklib/issues/24), fixed by [#25](https://github.com/homebysix/docklib/pull/25))
16+
17+
### Changed
18+
19+
- Specified UTF-8 encoding on docklib.py file.
20+
21+
1122
## [1.0.4] - 2019-10-08
1223

1324
### Fixed

Diff for: build-info.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ ownership: recommended
66
postinstall_action: none
77
preserve_xattr: false
88
suppress_bundle_relocation: true
9-
version: '1.0.4'
9+
version: '1.0.5'

Diff for: payload/Library/Python/2.7/site-packages/docklib.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/python
2+
# -*- coding: utf-8 -*-
3+
24
# pylint: disable=C0103
35

46
"""Routines for manipulating the Dock."""
@@ -114,9 +116,10 @@ def save(self):
114116
def findExistingLabel(self, test_label, section="persistent-apps"):
115117
"""Returns index of item with label matching test_label or -1 if not
116118
found."""
117-
if self.items[section]:
118-
for index in range(len(self.items[section])):
119-
if self.items[section][index]["tile-data"].get("file-label") == test_label:
119+
section_items = self.items[section]
120+
if section_items:
121+
for index, item in enumerate(section_items):
122+
if item["tile-data"].get("file-label") == test_label:
120123
return index
121124

122125
return -1

0 commit comments

Comments
 (0)