mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-10-31 01:51:15 +00:00
flake8 format
This commit is contained in:
1 parent
dc2386c583
commit
bb12ce191e
1 file changed
+4
-4
@@ -6,7 +6,6 @@ __maintainer__="Bob Mottram"
|
|||||||
__email__ = "bob@freedombone.net"
|
__email__ = "bob@freedombone.net"
|
||||||
__status__ = "Production"
|
__status__ = "Production"
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
def getXmppAddress(actorJson: {}) -> str:
|
def getXmppAddress(actorJson: {}) -> str:
|
||||||
"""Returns xmpp address for the given actor
|
"""Returns xmpp address for the given actor
|
||||||
@@ -17,7 +16,7 @@ def getXmppAddress(actorJson: {}) -> str:
|
|||||||
if not propertyValue.get('name'):
|
if not propertyValue.get('name'):
|
||||||
continue
|
continue
|
||||||
nameLower = propertyValue['name'].lower()
|
nameLower = propertyValue['name'].lower()
|
||||||
if not (nameLower.startswith('xmpp') or \
|
if not (nameLower.startswith('xmpp') or
|
||||||
nameLower.startswith('jabber')):
|
nameLower.startswith('jabber')):
|
||||||
continue
|
continue
|
||||||
if not propertyValue.get('type'):
|
if not propertyValue.get('type'):
|
||||||
@@ -33,6 +32,7 @@ def getXmppAddress(actorJson: {}) -> str:
|
|||||||
return propertyValue['value']
|
return propertyValue['value']
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
def setXmppAddress(actorJson: {}, xmppAddress: str) -> None:
|
def setXmppAddress(actorJson: {}, xmppAddress: str) -> None:
|
||||||
"""Sets an xmpp address for the given actor
|
"""Sets an xmpp address for the given actor
|
||||||
"""
|
"""
|
||||||
@@ -46,7 +46,7 @@ def setXmppAddress(actorJson: {},xmppAddress: str) -> None:
|
|||||||
continue
|
continue
|
||||||
if not propertyValue.get('type'):
|
if not propertyValue.get('type'):
|
||||||
continue
|
continue
|
||||||
if not (propertyValue['name'].lower().startswith('xmpp') or \
|
if not (propertyValue['name'].lower().startswith('xmpp') or
|
||||||
propertyValue['name'].lower().startswith('jabber')):
|
propertyValue['name'].lower().startswith('jabber')):
|
||||||
continue
|
continue
|
||||||
propertyFound = propertyValue
|
propertyFound = propertyValue
|
||||||
@@ -67,7 +67,7 @@ def setXmppAddress(actorJson: {},xmppAddress: str) -> None:
|
|||||||
if not propertyValue.get('type'):
|
if not propertyValue.get('type'):
|
||||||
continue
|
continue
|
||||||
nameLower = propertyValue['name'].lower()
|
nameLower = propertyValue['name'].lower()
|
||||||
if not (nameLower.startswith('xmpp') or \
|
if not (nameLower.startswith('xmpp') or
|
||||||
nameLower.startswith('jabber')):
|
nameLower.startswith('jabber')):
|
||||||
continue
|
continue
|
||||||
if propertyValue['type'] != 'PropertyValue':
|
if propertyValue['type'] != 'PropertyValue':
|
||||||
|
|||||||
Reference in new issue
Block a user