Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
6e9a6429
Commit
6e9a6429
authored
Oct 29, 2013
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed unpickling for BonjourNeighbours
parent
aa7f3761
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
contacts.py
blink/contacts.py
+8
-4
No files found.
blink/contacts.py
View file @
6e9a6429
...
...
@@ -212,6 +212,10 @@ class AllContactsGroup(VirtualGroup):
notification
.
center
.
post_notification
(
'VirtualGroupDidRemoveContact'
,
sender
=
self
,
data
=
NotificationData
(
contact
=
contact
))
class
BonjourNeighbourID
(
str
):
pass
class
BonjourURI
(
unicode
):
def
__new__
(
cls
,
value
):
instance
=
unicode
.
__new__
(
cls
,
unicode
(
value
)
.
partition
(
':'
)[
2
])
...
...
@@ -284,7 +288,7 @@ class BonjourNeighbour(object):
id
=
WriteOnceAttribute
()
def
__init__
(
self
,
id
,
name
,
hostname
,
uris
=
[],
presence
=
None
):
self
.
id
=
id
self
.
id
=
BonjourNeighbourID
(
id
)
if
isinstance
(
id
,
basestring
)
else
id
self
.
name
=
name
self
.
hostname
=
hostname
self
.
uris
=
BonjourNeighbourURIList
(
uris
)
...
...
@@ -975,7 +979,7 @@ class Contact(object):
group
=
AllContactsGroup
()
elif
isinstance
(
contact_id
,
GoogleContactID
):
group
=
GoogleContactsGroup
()
elif
isinstance
(
contact_id
,
BonjourServiceDescription
):
elif
isinstance
(
contact_id
,
(
BonjourNeighbourID
,
BonjourServiceDescription
)
):
group
=
BonjourNeighboursGroup
()
else
:
group
=
None
...
...
@@ -1115,7 +1119,7 @@ class ContactDetail(object):
group
=
AllContactsGroup
()
elif
isinstance
(
contact_id
,
GoogleContactID
):
group
=
GoogleContactsGroup
()
elif
isinstance
(
contact_id
,
BonjourServiceDescription
):
elif
isinstance
(
contact_id
,
(
BonjourNeighbourID
,
BonjourServiceDescription
)
):
group
=
BonjourNeighboursGroup
()
else
:
group
=
None
...
...
@@ -1258,7 +1262,7 @@ class ContactURI(object):
group
=
AllContactsGroup
()
elif
isinstance
(
contact_id
,
GoogleContactID
):
group
=
GoogleContactsGroup
()
elif
isinstance
(
contact_id
,
BonjourServiceDescription
):
elif
isinstance
(
contact_id
,
(
BonjourNeighbourID
,
BonjourServiceDescription
)
):
group
=
BonjourNeighboursGroup
()
else
:
group
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment