aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2020-07-29 11:45:56 -0400
committerJosh Matthews <josh@joshmatthews.net>2020-07-31 10:42:01 -0400
commit64df2c2d608e2c885e8e75ca43078a97de6dfd10 (patch)
tree7cb6b7ec62f9b46d78b53c9c85d65014b024f897 /python/tidy
parent5c0d7998bd28ceb383f553cd7af5a60f472a47ba (diff)
downloadservo-64df2c2d608e2c885e8e75ca43078a97de6dfd10.tar.gz
servo-64df2c2d608e2c885e8e75ca43078a97de6dfd10.zip
Fix tidy check when no duplicate versions present.
Diffstat (limited to 'python/tidy')
-rw-r--r--python/tidy/servo_tidy/tidy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 163fd99e867..7501e07d802 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -393,7 +393,8 @@ def check_lock(file_name, contents):
message += "\n\t\033[93mThe following packages depend on version {} from '{}':\033[0m" \
.format(version, short_source)
for pname, package_version, dependency in packages_dependencies:
- if version in dependency[1] and (not dependency[2] or short_source in dependency[2]):
+ if (not dependency[1] or version in dependency[1]) and \
+ (not dependency[2] or short_source in dependency[2]):
message += "\n\t\t" + pname + " " + package_version
yield (1, message)