Faidon has submitted this change and it was merged.
Change subject: Pep8 cleanup
......................................................................
Pep8 cleanup
Change-Id: If5f5806b5977da1bdad5cf209d444ad30c467543
---
M modules/apt/files/apt2xml.py
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
Hashar: Looks good to me, but someone else must approve
Faidon: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/apt/files/apt2xml.py b/modules/apt/files/apt2xml.py
index e4ee2a7..3e1b0a7 100644
--- a/modules/apt/files/apt2xml.py
+++ b/modules/apt/files/apt2xml.py
@@ -23,19 +23,22 @@
import apt
from xml.dom.minidom import Document
+
# shamelessly stolen from /usr/lib/update-notifier/apt_check.py ported/modified
def isSecurityUpgrade(candidate):
"check if the given version is a security update (or masks one)"
for origin in candidate.origins:
if (origin.origin == "Debian" and
- (origin.label == "Debian-Security" or origin.site ==
"security.debian.org")):
+ (origin.label == "Debian-Security" or
+ origin.site == "security.debian.org")):
return True
if (origin.origin == "Ubuntu" and
- origin.archive.endswith('-security')):
+ origin.archive.endswith('-security')):
return True
return False
+
def getUpdates():
cache = apt.Cache()
@@ -68,7 +71,7 @@
host.appendChild(u)
- return doc.toxml().replace('\n','')
+ return doc.toxml().replace('\n', '')
if __name__ == '__main__':
print getUpdates()
--
To view, visit https://gerrit.wikimedia.org/r/61892
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If5f5806b5977da1bdad5cf209d444ad30c467543
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Faidon <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits